mark several line of code as comment

6 次查看(过去 30 天)
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?

采纳的回答

FruitsLord
FruitsLord 2013-4-15
CTRL+R is the shortcut

更多回答(1 个)

Anand
Anand 2013-4-15
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 个评论
Sean de Wolski
Sean de Wolski 2013-4-15
Also, right clicking gives you these shortcuts

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by