How to use saveas() to save a .mat or .txt in specific directory on ubunto
How to use saveas() to save a .mat or .txt in specific directory on ubunto
I have tried:
saveas(keys ,keyname);
save(keys ,keyname ,'-mat');
save(keys ,keyname);
where keys
is a 3006x4104 matrix of the class double.
I tried to use some casting so I would save it as txt file
keys
for keyname
I tried - ./newdronephotos/1880key.mat
and newdronephotos/1880key.mat
.
keyname
./newdronephotos/1880key.mat
newdronephotos/1880key.mat
It's not working.
In particular, when I'm trying saveas(keys ,keyname);
it's starting to do some processes and then print the error message:Error using saveas (line 88)
Simulink object array must be a vector
saveas(keys ,keyname);
Error using saveas (line 88)
Simulink object array must be a vector
save
saveas
Obviously, I tried to use the help file before I posted the question.
– Yarden Sharabi
Sep 2 at 13:09
1 Answer
1
Actually, I just succeeded to solve my own problem.
The function save() expect to have a string of the name of the desired variable.
For example:
Instead of -
save(keyname ,keys);
I needed to write-
save(keyname ,'keys');
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Look at the help file for
save
. In which order do the inputs go? In which order do you have them?saveas
is not for saving matrices...– nkjt
Sep 2 at 12:58