why does my m file not save correctly

조회 수: 14 (최근 30일)
Jose Garcia
Jose Garcia 2019년 10월 28일
편집: per isakson 2019년 10월 28일
Ive tried to save multiple codes saving with the same conventional type. But for whatever reason when i try opening the .m file saved, it seems corrupt. All my .m files are behaving this way. Am i doing something wrong? or do i need to reload the system? I am not sure how to fix this issue.
I am using save file(title.m)
  댓글 수: 2
per isakson
per isakson 2019년 10월 28일
What exactly do you mean by "save file(title.m)" ?
Jose Garcia
Jose Garcia 2019년 10월 28일
I’m sorry, yes when I go to save my code in the command window I use Save filemycode.m then hit enter and the file will save. But when I try and open the saved .m file it opens corrupt and Just shows a bunch of symbols over the screen.

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

답변 (1개)

per isakson
per isakson 2019년 10월 28일
편집: per isakson 2019년 10월 28일
The command save is used to store variables of the current workspace, i.e. save data.
There is no simple command to save m-code. Instead it's typically done interactively.
  • Create or modify a code
  • Click the Save icon or the little down-arrow below the Save icon
  • Chose folder and filename
  • Click Save in the bottom right corner of the save file dialog
Open the m-file interactively. The Open File icon is next to the Save icon

카테고리

Help CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by