Having problems understanding the command y( size(t) ) in a plot.
Afficher commentaires plus anciens
The whole command is given as:
plot(x,y,’k’,xmax,y(size(t)),’o’,xmax/2,ymax,’o’)
x, y, xmax, t, and ymax are all assigned variables. However I have no idea what the size command does. Does anyone know what this does?
Réponses (2)
Walter Roberson
le 15 Déc 2011
1 vote
It is a fancy (and confusing) way to draw a vertical line at xmax that shows the range of y values. It would be clearer to use y([1 end])
Catégories
En savoir plus sur Valentines Day dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!