Dear users.... I have a program like this.
function exgui
fh = figure( 'units','pixels',... 'position',[50 ,50 , 600, 500]);
X=[2 4 7] Y=[4 6 8] h=plot(X,Y,'--r','LineWidth',1) ;
end
But above program excute in matlab R2013 ,, it shows error like' the expression to the left of the equals sign is not a valid target for an assignment' .

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 4월 14일

0 개 추천

X=[2 4 7]
Y=[4 6 8]
h=plot(X,Y,'--r','LineWidth',1)

추가 답변 (1개)

Joseph Cheng
Joseph Cheng 2014년 4월 14일

0 개 추천

In your line
X=[2 4 7] Y=[4 6 8] h=plot(X,Y,'--r','LineWidth',1) ;
it is trying to set everything after the X= to X. you'll need a semicolon, or put each onto their own line.

카테고리

도움말 센터File Exchange에서 Graphics Objects에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2014년 4월 14일

답변:

2014년 4월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by