How can I comment a group of lines without commenting each line?
ie like 'c'
/*
printf("hello");
printf("there");
*/
in Matlab the only way I know to do this is to comment each line
%disp('hello')
%disp('there')
I have a 100 lines to comment out, I would prefer to group comment it like 'c'.
thx
Can I comment a block of lines in an MATLAB file using /* ... */ as I can in C?:
%{
...
Block of COMMENTS HERE
...
...
%}
%CODE GOES HERE
plot(1:10)
1) MATLAB v7+:
%{
...code to be commented
%}
2) Use the editor:
select all the lines, then choose toggle comment or something in the menu. it's there
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With