필터 지우기
필터 지우기

How to I resolve "the operation or expression '(' has no effect" when plotting?

조회 수: 12 (최근 30일)
Jayne
Jayne 2014년 3월 24일
댓글: Walter Roberson 2014년 3월 24일
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:
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?

답변 (1개)

Sandeep Math
Sandeep Math 2014년 3월 24일
  댓글 수: 2
Jayne
Jayne 2014년 3월 24일
I figured out that I had previously defined a variable called "plot" and this was the reason for this error message. It is important to pay attention to variable names in code, lesson learned. Thank you for your help.
Walter Roberson
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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by