Hi, i've been struggling trying to get app designer to load in and then save a .mat file.
Loading in is fine.
function LoadButtonPushed(app, event) app.File = load("data.mat"); app.UITable.Data = app.File.data; end
data.mat is 50×9 table which itself holds additional tables within one column. I can show this data in a table easily enough as I have above.
I shall edit this data at a later point..
My question/problem is that:
All I want to do at the moment is to take this and save it as a seperate .mat file when I press a save button on my App in App Designer. However nothing I seem to do works.
function SaveButtonPushed(app, event) app.File.Newdata = app.File.data; % Sticks the data into Newdata
%save('NewData.mat','-struct','app.File.NewData')
%save('NewData.mat') % Doesn't work
%save('NewData.mat','app.File.NewData')
%Below I tried to save the structure to a variable and then save it that way
NewData = app.File; save(NewDataFile,'-struct','NewData'); end
Please if anyone has a solution I would be appreciative as I cannot seem to get it to work.
All I want is another file to be made with the data in.
Best Answer