Skip to Main Content Skip to Search
Product Documentation

patch - Draw color patch of specified shape on masked subsystem icon

Syntax

patch(x, y)
patch(x, y, [r g b])

Description

patch(x, y) creates a solid patch having the shape specified by the coordinate vectors x and y. The patch's color is the current foreground color.

patch(x, y, [r g b]) creates a solid patch of the color specified by the vector [r g b], where r is the red component, g the green, and b the blue. For example,

patch([0 .5 1], [0 1 0], [1 0 0])

creates a red triangle on the mask's icon.

Examples

The command

patch([0 .5 1], [0 1 0], [1 0 0])

creates a red triangle on the mask's icon.

See Also

image | plot

  


Related Products & Applications

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

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