MATLAB Answers

Is it possible to make inactive some of lines?

조회 수: 2(최근 30일)
Volkan Yangin
Volkan Yangin 2021년 7월 8일
댓글: Bruno Luong 2021년 7월 8일
Assume that
A = [a*b;... %line 1
a*b^2;... %line 2
a*b^3;... %line 3
]
Is it possible to generate a command to make inactive any line, for ex. line 2 like:
A = [a*b;... %line 1
%a*b^2;... %line 2
a*b^3;... %line 3
]
Thanks,
  댓글 수: 2
Volkan Yangin
Volkan Yangin 2021년 7월 8일
The question is related with my problem given in link:
I have to generate a formula according to any number. It is so easy in MATLAB, but SIMULINK gives me a lot of error when i implement this code.

댓글을 달려면 로그인하십시오.

답변(1개)

Bruno Luong
Bruno Luong 2021년 7월 8일
Put "..." (without the quotes) in front of the lines you want to hide
  댓글 수: 3
Bruno Luong
Bruno Luong 2021년 7월 8일
Just to be sure you understand what I wrote
A = [a*b;... %line 1
... a*b^2; ... %line 2
a*b^3;... %line 3
]

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by