My saving function works before compiling it as a standalone software using app designer
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Aung Moe Zaw
am 30 Dez. 2021
Kommentiert: Aung Moe Zaw
am 30 Dez. 2021
The save function works and save the data from the table to .mat folder when i run in matlab. But after i compile it into a standalone software, it does not work the same way. It does not save no more and when i press the save button, it acts as error.
function startupFcn(app)
app.anam=load("Anam.mat","mergefilesanam");
assignin("base",'anam',app.anam);
app.data=evalin("base",'anam.mergefilesanam');
app.UITable_2.Data=app.data;
app.UITable.Data=app.data;
app.UITable_2.ColumnName=app.data.Properties.VariableNames;
app.UITable.ColumnName=app.data.Properties.VariableNames;
app.numRows=size(app.data,1);
end
function savebuttonImageClicked(app, event)
mergefilesanam=(app.UITable.Data);
save("Anam.mat","mergefilesanam");
anam=load("Anam.mat","mergefilesanam");
assignin("base",'anam',anam);
end
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 30 Dez. 2021
Specify the full file name -- folder plus base file name plus extension:
folder = 'd:\mydata'; % Wherever you want.
fullFileName = fullfile(folder, 'Anam.mat');
save(fullFileName,"mergefilesanam");
6 Kommentare
Weitere Antworten (1)
Walter Roberson
am 30 Dez. 2021
Did your app cd() to somewhere? If not, then what directory do you think you are in at the time you save() ?
Siehe auch
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!