How to I resolve "the operation or expression '(' has no effect" when plotting?
12 ビュー (過去 30 日間)
古いコメントを表示
I am trying to plot two vectors, where QTH is a row vector of length 5. This is the command as it appears in my code:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/159409/image.png)
You can see the first bracket is highlighted and underlined with the red squiggly error mark. When I hover over the error with my cursor I get the message:
the operation or expression '(' has no effect.
Does anyone have any idea why I would get this error for a simple plot?
0 件のコメント
回答 (1 件)
Sandeep Math
2014 年 3 月 24 日
Try:
figure
plot([1:5], QTL)
2 件のコメント
Walter Roberson
2014 年 3 月 24 日
The [] around the 1:5 is not needed.
Using a variable named plot() will usually cause problems.
Also watch out for spaces after names: it can lead to the parser thinking that you are using the "command" form instead of the "function" form.
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!