필터 지우기
필터 지우기

Code Sections disappeared. Cannot use %%

조회 수: 12 (최근 30일)
Darcy
Darcy 2015년 3월 9일
댓글: CHEN YU-AN 2021년 3월 2일
I closed MATLAB and when I re-opened it, all my code sections were gone. I had previously enabled code folding around code sections as well and I can no longer do this.
For example, I have a code which has:
A=10;
B=20;
C=A+B;
D=A*B;
Previously, I could fold up the first section and run it separately from the second section. Now these code sections have disappeared. Any help or info is greatly appreciated.
I also cannot fold up my for, if, while statements etc. I have checked in Preferences and Code Folding is enabled.
  댓글 수: 1
Tobe freeman
Tobe freeman 2015년 6월 12일
Me, too! It's been flakey for ages. I am a little disappointed that there is nothing about this bug on Matlab central - or stackoverflow etc.

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

채택된 답변

Christopher Buchanan
Christopher Buchanan 2017년 2월 15일
It sounds like MATLAB hasn't been able to parse the entire .m file - I had a similar issue until I realised one of my if/for statements hadn't been terminated with an 'end'...maybe until MATLAB is able to parse everything completely it doesn't know how to interpret context-sensitive markers like code folders and section breaks.
  댓글 수: 4
Ang Ji
Ang Ji 2019년 1월 18일
Thanks Chris! I terminated and it works.
CHEN YU-AN
CHEN YU-AN 2021년 3월 2일
Thanks, it is really helpful

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Debugging and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by