MATLAB Answers

Locks
0

mark several line of code as comment

Asked by Locks
on 15 Apr 2013

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?

  0 Comments

Log in to comment.

2 Answers

Answer by LordOfFruits on 15 Apr 2013
 Accepted Answer

CTRL+R is the shortcut

  1 Comment

perfect, thanks!

Log in to comment.


Answer by Anand
on 15 Apr 2013

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 Comments

Show 1 older comment

Also, right clicking gives you these shortcuts

perfect, thanks

Log in to comment.


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Win prizes and improve your MATLAB skills

Play today