MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics) MATLAB Function Reference (Volume 2: Graphics)

12.07.2015 Views

stairsPurpose2stairsStairstep plotSyntaxDescriptionstairs(Y)stairs(X,Y)stairs(...,LineSpec)[xb,yb] = stairs(Y)[xb,yb] = stairs(X,Y)Stairstep plots are useful for drawing time-history plots of digitally sampleddata systems.stairs(Y) draws a stairstep plot of the elements of Y. When Y is a vector, thex-axis scale ranges from 1 to size(Y). When Y is a matrix, the x-axis scaleranges from 1 to the number of rows in Y.stairs(X,Y) plots X versus the columns of Y. X and Y are vectors of the samesize or matrices of the same size. Additionally, X can be a row or a columnvector, and Y a matrix with length(X) rows.stairs(...,LineSpec) specifies a line style, marker symbol, and color for theplot (see LineSpec for more information).[xb,yb] = stairs(Y) and [xb,yb] = stairs(x,Y) do not draw graphs, butreturn vectors xb and yb such that plot(xb,yb) plots the stairstep graph.ExamplesCreate a stairstep plot of a sine wave.x = 0:.25:10;stairs(x,sin(x))2-454

stairs10.80.60.40.20−0.2−0.4−0.6−0.8−10 2 4 6 8 10See Alsobar, hist2-455

stairsPurpose2stairsStairstep plotSyntaxDescriptionstairs(Y)stairs(X,Y)stairs(...,LineSpec)[xb,yb] = stairs(Y)[xb,yb] = stairs(X,Y)Stairstep plots are useful for drawing time-history plots of digitally sampleddata systems.stairs(Y) draws a stairstep plot of the elements of Y. When Y is a vector, thex-axis scale ranges from 1 to size(Y). When Y is a matrix, the x-axis scaleranges from 1 to the number of rows in Y.stairs(X,Y) plots X versus the columns of Y. X and Y are vectors of the samesize or matrices of the same size. Additionally, X can be a row or a columnvector, and Y a matrix with length(X) rows.stairs(...,LineSpec) specifies a line style, marker symbol, and color for theplot (see LineSpec for more information).[xb,yb] = stairs(Y) and [xb,yb] = stairs(x,Y) do not draw graphs, butreturn vectors xb and yb such that plot(xb,yb) plots the stairstep graph.ExamplesCreate a stairstep plot of a sine wave.x = 0:.25:10;stairs(x,sin(x))2-454

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!