Comment out the rest of the code
6 views (last 30 days)
Show older comments
Suppose I have a list of codes and I would like to comment out everything after line 100. Is there any way simpler thatn %{.....%}?
2 Comments
Elias Gule
on 29 Mar 2018
Do you want automate the whole process? If so, you need to write a function that prepends '%' at the beginning of each non-empty after line 100 of your codes.
David Fletcher
on 29 Mar 2018
Not really sure it's any simpler (in truth, I'm not sure there's all that much that is simpler than %{ %}, but you can highlight the code and press ctrl R (all this does though is insert a % on every line)
Answers (2)
David Fletcher
on 29 Mar 2018
I suppose you could put in a double %% at line 100 to create a new section, and then just use the run section option on the previous section of code. Saying that, with your comment about breakpoints I'm not entirely convinced we're even talking about the same thing
0 Comments
See Also
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!