User`s guide

Examples: Program GUI C omponents
Note Create your own icon with the icon editor described in “Icon Editor” on
page 15-63. See the
ind2rgb reference page for information on converting
amatrix
X and corresponding colormap, i.e., an (X, MAP) image, to R GB
(truecolor) format.
Toggle Tool
The toggle too l OnCallback and OffCallback properties specify the toggle
tool control actions that occur when the toggle tool is clicked and its
State
property changes to on or off. The toggle tool ClickedCallback property
specifies a control action that takes place whenever the toggle tool is clicked,
regardless of state.
The following example uses a toggle tool to toggle a plot between surface
and mesh views of the
peaks data. The example also counts the number of
times you have clicked the toggle tool.
The
surf function produces a 3-D shaded surface plot. The mesh function
creates a wireframe parametric surface.
peaks returns a square matrix
obtained b y translating an d scaling Gaus sian distributions
12-39