Transferred from: http://icictech.blog.163.com/blog/static/2797425420084595725499/
1) Method One
Select the content you want to annotate, and then choose the Tools menu "Text|comment", if you want to change the comment to a statement, also select the statement you want to convert, then use the mouse to select "Text|uncomment". Keyboard shortcut keys are "Ctrl+r".
Or select the content you want to annotate, right click on the mouse to select "Comment", if you want to change the comment into a statement, also select the statement to be changed, and then right-click the mouse to select "Uncomment" uncomment. Keyboard shortcut keys are "Ctrl+t".
2) Method Two
Using Matlab block annotation method
%{
You need to comment on several command lines that are not executed
%}
3) method Three
Add a line before the comment segment: if LOGICAL (0)
Add a line after the comment segment: End
Unlike the first two methods, this method actually does not execute the related statement through the logical judgment statement
===============
Three ways to annotate multiple lines of MATLAB