Path: Common/Graphics
% Create a slider in a new figure with continuous calls to callback. Can optionally put the slider into an existing figure. Type SliderBar for a demo. -------------------------------------------------------------------------- Form: SliderBar( valMin, valMax, val0, callback, name, position, fig ) -------------------------------------------------------------------------- ------ Inputs ------ valMin (1,1) Minimum value for slider bar valMax (1,1) Maximum value for slider bar val0 (1,1) Initial value of slider callback Callback function, 1 var. Example: @(x) disp(sin(x)) name (1,:) String name for figure (optional) position (1,4) Position information. * If a new figure is created, this input defines the position of the new figure in pixels on the screen. OR... * If an existing figure is specified, this input defines the position of the slider within the given figure window. fig (1,1) Figure handle. Optional. Supply this input to put the slider inside this figure, rather than creating a new figure. ------- Outputs ------- u (1,1) Handle to the slider object. --------------------------------------------------------------------------
Common: Graphics/Map
Back to the Common Module page