Problem with saving a Matlab file
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi Guys,
My code shoud generate a mat lab file in which I have all the variables. Unfortunatly, I am not able to generate it correclty: Instead of having a .mat file I have a blank file without "termination" (not .mat). Can you help me to understand the problem?
basename=1ug
save([basename '_BTads']) . This is the line I use to save it
thanks
0 Kommentare
Antworten (1)
Star Strider
am 10 Feb. 2022
Always supply the .mat extension yourself. MATLAB has no way of knowing otherwise, and assumes that what you assume is a file name is a variable that MATLAB can’t find.
See if:
save([basename '_BTads.mat'])
will do what you want. (This will save every variable in the current workspace, not selected variables, so specify them if you only wnat to save some of them.)
.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Debugging and Analysis 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!