필터 지우기
필터 지우기

Saving of m-files

조회 수: 6 (최근 30일)
IYER RAMKUMAR RAMESH
IYER RAMKUMAR RAMESH 2015년 3월 20일
편집: usa usah 2016년 2월 16일
When I am working on a project, I keep on making some changes in my m-file, so there comes a star(*) near the name of the m.file (which means its not saved). But I make some changes and run the m-file, its gets saved automatically, so I lose the things which I just edited.When I am editing many things I don't remember what all I changed. I know I can use the % symbol to prevent something from getting complied. I think this the new feature of Matlab 2015a. But this was not happening before in 2014a version. I want Matlab to always ask me before it saves anything. Is this possible. If yes, pls tell me the setting how 2 do this? Thanks.

채택된 답변

the cyclist
the cyclist 2015년 3월 20일
One possibility is to use code sections. Surround sections of code with "%%" like this
% This code is in one cell
x = 5
% This code is in the next cell
x = 6
% This code is in the next cell
x = 7
Then, in the editor,click anywhere in that section, then right-click and select "Evaluate this section". (There is also a keyboard shortcut.) It will evaluate your edited code, but not save it.
You can surround all of your code with %% ... %%, and run the whole code that way.
  댓글 수: 1
IYER RAMKUMAR RAMESH
IYER RAMKUMAR RAMESH 2015년 3월 20일
Thanks for your reply.

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

추가 답변 (2개)

Sean de Wolski
Sean de Wolski 2015년 3월 20일
The autosave behavior was new in R2014b. You can disable it in preferences
As for making lots of changes, the use of sections like the Cyclist has proposed is good. You also might consider using GIT or SVN to keep track of changes that you commit etc.
  댓글 수: 1
IYER RAMKUMAR RAMESH
IYER RAMKUMAR RAMESH 2015년 3월 20일
Thanks for ur reply. Was helpful.

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


usa usah
usa usah 2016년 2월 16일
편집: usa usah 2016년 2월 16일
Thank you for the question and thank you for the answer. Indeed, it is a silly option

카테고리

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