section divider or %% is not working
Ältere Kommentare anzeigen
I solved several small problems in sections using section divider %% Section. I ran each sections & every section worked. Today I opened the file, %% Sections are there, but section dividers are not working. How to correct the situation. Thanks Abu Sarwar
1 Kommentar
Jan
am 8 Jan. 2017
What does "section dividers are not working" exactly mean?
Akzeptierte Antwort
Weitere Antworten (5)
It's also worth noting that having open scopes, imbalanced parentheses/brackets, or other gross errors can break the handling of section breaks. It's a bit moot, since invalid code won't run anyway, but that might be one reason your section highlighting suddenly stops working.
A = [1 2 3; % this is an error
%% oh no my cell divider doesn't work!
B = 12.34; % some other code
the cyclist
am 8 Jan. 2017
0 Stimmen
Did you try simple things like saving and re-opening the file, or restarting MATLAB?
1 Kommentar
Abu Sarwar
am 8 Jan. 2017
Image Analyst
am 8 Jan. 2017
Bearbeitet: Image Analyst
am 5 Mai 2023
0 Stimmen
And how did you try to execute it? Did you use the green Run triangle or F5, OR did you try Step or F10? Which way? Using F5 will just blast through everything without stopping at cells whereas F10 will stop at cells.
Also make sure the Section Break checkboxes are checked in the Autoformatting preferences:

Megan Yip
am 20 Jan. 2021
Verschoben: Image Analyst
am 5 Mai 2023
For anyone eldr who had this problem, make sure that if you have text after the %%, that you have a space between the second % and the first text character. For example, use
%% Section Name
which will work, rather than
%%Section Name
which won't work.
GANDI RAVIKUMAR
am 4 Mai 2023
0 Stimmen
May be below is the one of the reason..
Check your file name with which you have saved.
File name should not have any spaces, if it contains any spaces just rename it and remove spaces then it might work.
Check once.
Thank you...!!!!1
Kategorien
Mehr zu Solver Outputs and Iterative Display finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
