| Using Simulink | ![]() |
Displaying Graphics on the Block Icon
You can display plots on your masked block icon by entering one or more plot commands. You can use these forms of the plot command.
plot(Y); plot(X1,Y1,X2,Y2,...);
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.
For example, this command generates the plot that appears on the icon for the Ramp block, in the Sources library. The icon appears below the command.
plot([0 1 5], [0 0 4])![]()
Plot commands can include NaN and inf values. When NaNs or infs are encountered, Simulink 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. For more information, see Controlling Icon Properties.
Simulink displays three question marks (? ? ?) in the block icon and issues warnings in these situations:
| Displaying Text on the Block Icon | Displaying Images on Masks | ![]() |