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!