Skip to content
This repository was archived by the owner on Nov 25, 2018. It is now read-only.

Commit 8d3f917

Browse files
committed
Changed final output of function
Switched the output of the function from a saved *.mat file (that I forgot to code) to a data structure. This allows the user to customize data storage behavior per GUI.
1 parent c797ead commit 8d3f917

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

saveGUIstate.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
function saveGUIstate(h)
1+
function [output] = saveGUIstate(h)
22
% Write better documentation here <-
33
%
44
% Input is a structure array of handles from programmatic or GUIDE GUIs
5-
% Output is a saved *.mat file with the specified properties
5+
% Output is a structure of the handles with nested structures for each
6+
% property to store.
67
%
78
% Assumes all structure arrays with the same field name are of the same
89
% object type (e.g. 3 sliders stored as h.slider(1), h.slider(2), ...) so
910
% the user can utilize the return of set/get natively.
1011

1112
propertystruct = initializeproperties();
12-
outfilename = 'savedState.mat';
1313

1414
objectlist = fieldnames(h);
15-
1615
for ii = 1:length(objectlist)
1716
objtype = get(h.(objectlist{ii}), 'Type');
1817
if iscell(objtype)

0 commit comments

Comments
 (0)