Member of the plots class.
stairs(x, y)
stairs(y)
[x0, y0] = stairs(x, y)
[x0, y0] = stairs(y)
Returns matrices that you can use to plot stairstep graphs. stairs(y) is equivalent to stairs(1:size(y, 1), y). If you do not specify an output, this function plots stairstep graphs in the current figure window.
| Name | Description |
| x | Specifies a real matrix. x must be in ascending order. If y is a vector, x must be a vector of the same length. If y is a matrix, x must be a matrix of the same size or an array whose length is equal to the number of rows in y. |
| y | Specifies a real matrix. |
| Name | Description |
| x0 | Returns a matrix that you can use to plot stairstep graphs. |
| y0 | Returns a matrix that you can use to plot stairstep graphs. |
[X0, Y0] = stairs(1:10, rand(1, 10))
plot(X0, Y0)
[X0, Y0] = stairs(rand(1, 10))
plot(X0, Y0)