Corrupted .m file after save function in script?

조회 수: 5 (최근 30일)
Vuk
Vuk 2018년 4월 18일
댓글: Walter Roberson 2018년 4월 18일
Hi all,
in a big script of mine I run the 'save filename.m' command to save the executed script in a folder.
However, after creating this file it seems to be corrupted and is not openable with matlab.
I will spare you the content of the file, since it is just gibberish machine code I assume.
How can I save the exact script (that just ran) as a file inside a folder ? - so that I know how the script look liked at the time, and what variables where used.
Thank you very much in advance!

답변 (1개)

Star Strider
Star Strider 2018년 4월 18일

It is currently in a MATLAB® formatted binary file. You probably have to load it back into your workspace. That may restore it.

If you decide to do that again, it would be worthwhile to save it as an ASCII file, described in Save Data to ASCII File (link) in the documentation for save.

  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 4월 18일
Any code that was in filename.m is wiped out and will need to be restored from backups.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by