Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

plot - Draw graph connecting series of points

Syntax

plot(Y)
plot(X1,Y1,X2,Y2,...)

Description

plot(Y) plots, for a vector Y, each element against its index. If Y is a matrix, it plots each column of the matrix as though it were a vector.

plot(X1,Y1,X2,Y2,...) plots the vectors Y1 against X1, Y2 against X2, and so on. Vector pairs must be the same length and the list must consist of an even number of vectors.

Plot commands can include NaN and inf values. When NaNs or infs are encountered, Simulink software stops drawing, then begins redrawing at the next numbers that are not NaN or inf. The appearance of the plot on the icon depends on the value of the Drawing coordinates parameter.

Simulink software displays three question marks (? ? ?) in the block icon and issues warnings in these situations:

Examples

This command

plot([0 1 5], [0 0 4])

generates the plot that appears on the icon for the Ramp block, in the Sources library.

See Also

image

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS