Save command with full directory MATLAB 2012b
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
An error seems to occur with the save command when using it when choosing a filename with the full directory attached. Has this always happened or is this a new problem with MATLAB 2012b?
e.g. The following works fine:
save Test.mat VarA VarB
The following recieves an error:
save c:\Documents and Settings\TheUserName\Desktop\MyFolder\Test.mat VarA VarB
The error recieved is:
Error using save
Variable ' and' not found
0 Kommentare
Antworten (1)
Jan
am 31 Okt. 2012
Bearbeitet: Jan
am 31 Okt. 2012
The non-functional form of save causes troubles again and again. So better use the functional form:
save('c:\Documents and Settings\TheUserName\Desktop\MyFolder\Test.mat', ...
'VarA', 'VarB');
Lucas' version works in all Matlab version I know, but the smart conversion of the arguments of the non-functional form is not documented and changes between Matlab versions. Sometimes numbers are assumed to be strings, sometimes they are numbers, etc.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Whos finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!