mark several line of code as comment

hi,
I know that the % sign is used to make code to comment, but unfortunately I am not able to do this for a whole paragraph, is there a way to mark a whole paragraph as comment?

 Akzeptierte Antwort

FruitsLord
FruitsLord am 15 Apr. 2013

0 Stimmen

CTRL+R is the shortcut

Weitere Antworten (1)

Anand
Anand am 15 Apr. 2013

1 Stimme

If you want a comment block you could do this:
%{
...
CODE THAT SHOULDN'T RUN
...
...
%}
Note that the '%{' needs to be a new line with nothing else on that line.

4 Kommentare

Locks
Locks am 15 Apr. 2013
thanks, that's even better.
is there a shortcut to make the comment to code again?
Sean de Wolski
Sean de Wolski am 15 Apr. 2013
ctrl + t
Sean de Wolski
Sean de Wolski am 15 Apr. 2013
Also, right clicking gives you these shortcuts
Locks
Locks am 15 Apr. 2013
perfect, thanks

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Variables finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by