how to make matlab save (filename) command work?

조회 수: 1 (최근 30일)
Loren99
Loren99 2022년 6월 9일
편집: Stephen23 2022년 6월 9일
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