Effacer les filtres
Effacer les filtres

how to plot graph in gui?

3 vues (au cours des 30 derniers jours)
ramesha
ramesha le 14 Avr 2014
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' .

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 14 Avr 2014
X=[2 4 7]
Y=[4 6 8]
h=plot(X,Y,'--r','LineWidth',1)

Plus de réponses (1)

Joseph Cheng
Joseph Cheng le 14 Avr 2014
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.

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by