Having problems understanding the command y( size(t) ) in a plot.
4 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (2 件)
Walter Roberson
2011 年 12 月 15 日
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])
0 件のコメント
bym
2011 年 12 月 15 日
it just plots xmax vs y(size(t)) as a second trace on the plot, but with the same markings as [xmax/2,ymax]...Have to see more code to figure why...
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!