MATLAB Answers

How to block out code in Live Script

3 views (last 30 days)
alpedhuez
alpedhuez on 26 Apr 2020
Commented: alpedhuez on 26 Apr 2020
Suppose I have a live script like
a=1
and
b=2
and
c=3
Now I want to comment out the first two block of the code. That is,
%a=1
and
%b=2
and
%c=3
But is there any way to block out like?
/*
a=1
and
b=2
*/
c=3

Accepted Answer

Les Beckham
Les Beckham on 26 Apr 2020
%{
a = 1;
b = 2;
%}
c = 3;
  1 Comment
alpedhuez
alpedhuez on 26 Apr 2020
Yes or select these parts, right click, and choose "comment."

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!