要注释掉编辑器或实时编辑器中的一大块代码,请选择该代码并在“编辑器”或“实时编辑器”选项卡上,单击“评论”按钮。这将在每一行前面插入一个“%”符号。或者,选择代码并输入“Ctrl”+“R”。要取消对选定文本的注释,单击“取消注释”按钮或输入“Ctrl”+“T”。
您还可以使用块注释操作符“%{”和“%}”。"%{"和"%}"操作符必须单独出现在帮助文本块前后的行中。例如:
% {
需要注释掉的东西
%}
3评论
直接链接到这个评论
//www.tatmou.com/matlabcentral/answers/122-how-do-i-comment-out-a-large-block-of-code-in-matlab#comment_587082
直接链接到这个评论
//www.tatmou.com/matlabcentral/answers/122-how-do-i-comment-out-a-large-block-of-code-in-matlab#comment_587082
直接链接到这个评论
//www.tatmou.com/matlabcentral/answers/122-how-do-i-comment-out-a-large-block-of-code-in-matlab#comment_832311
直接链接到这个评论
//www.tatmou.com/matlabcentral/answers/122-how-do-i-comment-out-a-large-block-of-code-in-matlab#comment_832311
直接链接到这个评论
//www.tatmou.com/matlabcentral/answers/122-how-do-i-comment-out-a-large-block-of-code-in-matlab#comment_950302
直接链接到这个评论
//www.tatmou.com/matlabcentral/answers/122-how-do-i-comment-out-a-large-block-of-code-in-matlab#comment_950302
登录评论。