how to plot 2D graph in GUI?

3 vues (au cours des 30 derniers jours)
ramesha
ramesha le 12 Avr 2014
Commenté : ramesha le 14 Avr 2014
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?

Réponse acceptée

Alberto
Alberto le 12 Avr 2014
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 commentaires
Alberto
Alberto le 14 Avr 2014
Modifié(e) : Alberto le 14 Avr 2014
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 le 14 Avr 2014
Thank you.. .... I got result

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Specifying Target for Graphics Output dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by