xxxxxxxxxx
% This is a one-line comment
%{
This is a
multi-line
comment
%}
xxxxxxxxxx
1) first select the codes
2) comment with: Ctrl + R
delete comment with: Ctrl + T
In row comment
xxxxxxxxxx
% This vector is totally 1 line and still totally has comments. Booyah!
my_vector = [1, 2, 3, Some comment about "line 1"
4, 5, 6, Some comment about "line 2" (these are not seperate lines)
7, 8, 9];
% Also I don't know why but when you click the mathworks link it doesn't
% work but if you copy it and paste into the browser then it works. ¯\_(ツ)_/¯
https://www.mathworks.com/help/matlab/matlab_prog/comments.html