Save command with full directory MATLAB 2012b
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Jan
le 31 Oct 2012
Modifié(e) : Jan
le 31 Oct 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 commentaires
Voir également
Catégories
En savoir plus sur Whos dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!