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 Exchange2-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