i have two co-ordinates like x and y, I enter the values of x and y then how to plot in GUI? X Y 2 4 4 6 7 8 take the above values i plot the graph in GUI?

 채택된 답변

Alberto
Alberto 2014년 4월 12일

0 개 추천

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

댓글 수: 3

ramesha
ramesha 2014년 4월 14일
Run this program, it shows x and y are undefined function.
Alberto
Alberto 2014년 4월 14일
편집: Alberto 2014년 4월 14일
It worked in mine. I used capitals for variables X and Y.
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
will show
ramesha
ramesha 2014년 4월 14일
Thank you.. .... I got result

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2014년 4월 12일

댓글:

2014년 4월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by