Start of trail visualization_get_frame_rate navigation bar

Table of Contents

visualization_get_frame_period

Returns the frame rate for the scene as a sampling period.

Syntax

visualization_get_frame_period(block)  % Return the frame period for the specific block
visualization_get_frame_period         % Return the frame period for the current block
    

Description

Returns the frame rate for the scene associated with the current block as a sampling period. The units are seconds. The period is rounded to an integer multiple of the base step size of the model so that the output of this function may be used as the sample time of a Visualization Set Variables block, for example.

This function may only be used with one of the Visualization blocks. It will exit with an error if invoked for any other type of block. It is typically used as the Sample time parameter of a Visualization Set Variables block. In this case, no argument is necessary.

Parameters

block

The handle of a Visualization block for which to return the frame period, or the path to the block. This argument is unnecessary if the function is used as the Sample time parameter of a Visualization block. If this parameter is omitted then the current block as returned by gcb is used.

Outputs

This function has no outputs.

Examples

        p = visualization_get_frame_period; % Returns the frame period in seconds for the current block
    

See Also

 

navigation bar