how to make matlab save (filename) command work?

1 次查看(过去 30 天)
Hi everyone! When I try to write save(filename) something strange like this happen to my code. The strange thing is that a week ago I was able to use these command without problems. Can anyone help me?
  1 个评论
Stephen23
Stephen23 2022-6-9
编辑:Stephen23 2022-6-9
"how to make matlab save (filename) command work?"
It does work: you told MATLAB to save the current workspace in a MAT file, and that is exactly what happened.

请先登录,再进行评论。

采纳的回答

Voss
Voss 2022-6-9
编辑:Voss 2022-6-9
save saves to a mat file, so what is happening when you do this
save('untitled2.m')
is that a file is created called untitled.m, which has .m extension but .mat format, so when you look at it in the editor you're looking at binary data contained in that mat file.
To save a mat file with .mat extension do this
save('untitled2.mat')
or this
save('untitled2')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by