I have made an app in Appdesigner, and would like to save the session and load it at a later time. I tryed to save the app object, close the application, open the application and load the app object. That resultet in multiple app sessions. I have also saved the fields of the app object to a struct with a different name. That generated the following warnings:
-Warning: Unable to save App Designer app object. Save not supported for matlab.apps.AppBase objects.
-Warning: Unable to save App Designer app object. Save not supported for matlab.apps.AppBase objects.
The process was later reversed to obtain the saved fields to the app object (the code is shown below). That resultet in the following warnings:
-Warning: While loading an object of class 'My_app': Unable to load App Designer app object. Load not supported for matlab.apps.AppBase objects.
Is it really not possible to save/load app objects?
function SavemetadataMenuSelected(app, event)
[file,path] = uiputfile('*.mat', 'Store calibration:','init_raw.mat');
fields = fieldnames(app);
data = struct;
for i = 1:numel(fields)
data.(fields{i}) = app.(fields{i});
end
data = rmfield(data,'UIFigure');
try
save(fullfile(path,file),'data')
catch ME
warning('Warning during saving: %s %s', ME.identifier, ME.message)
end
end
function LoadmetadataMenuSelected(app, event)
uiopen('init_raw.mat')
fields = fieldnames(data);
for i = 1:numel(fields)
app.(fields{i}) = data.(fields{i});
end
show_img(app);
plot_calibration(app);
end