Debian Codegraph @

test/private/restoreGlobalState.m

raw
1 function restoreGlobalState(orig)
2 % Restore original properties of global state.
3 % See #542 and #552
4 fprintf('Restore global state...\n');
5
6 % Restore relevant properties
7 state_fields = fieldnames(orig);
8 for i = 1:length(state_fields)
9 set(0, state_fields{i}, orig.(state_fields{i}).val);
10 end
11 end