MATLAB Answers

Locks

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

Products

No products are associated with this question.

2 Answers

Answer by Xu Zhang
on 15 Apr 2013
 Accepted answer

CTRL+R is the shortcut

  1 Comment

Locks
on 15 Apr 2013

perfect, thanks!


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

Sean de Wolski
on 15 Apr 2013

ctrl + t

Sean de Wolski
on 15 Apr 2013

Also, right clicking gives you these shortcuts

Locks
on 15 Apr 2013

perfect, thanks


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today