Step

Generate step function

  • Library:
  • Simulink / Sources

Description

The Step block provides a step between two definable levels at a specified time. If the simulation time is less than the Step time parameter value, the block's output is the Initial value parameter value. For simulation time greater than or equal to the Step time, the output is the Final value parameter value.

The numeric block parameters must be of the same dimensions after scalar expansion. If the Interpret vector parameters as 1-D option is off, the block outputs a signal of the same dimensions and dimensionality as the parameters. If the Interpret vector parameters as 1-D option is on and the numeric parameters are row or column vectors (that is, single-row or column 2-D arrays), the block outputs a vector (1-D array) signal. Otherwise, the block outputs a signal of the same dimensionality and dimensions as the parameters.

Ports

Output

expand all

Output step function signal defined by the parameters Step time, Initial value, and Final value.

Data Types: double

Parameters

expand all

Specify the time, in seconds, when the output jumps from the Initial value parameter to the Final value parameter.

Programmatic Use

Block Parameter: Time
Type: character vector
Values: '1' | real- or complex-valued scalar, vector, or matrix
Default: '1'

Specify the block output until the simulation time reaches the Step time parameter.

Programmatic Use

Block Parameter: Before
Type: character vector
Values: '1' | real- or complex-valued scalar, vector, or matrix
Default: '0'

Specify the block output when the simulation time reaches and exceeds the Step time parameter.

Programmatic Use

Block Parameter: After
Type: character vector
Values: '1' | real- or complex-valued scalar, vector, or matrix
Default: '1'

Specify the sample rate of step. See Specify Sample Time for more information.

Programmatic Use

Block Parameter: SampleTime
Type: character vector
Values: scalar
Default: '0'

Select this check box to output a vector of length N if the Constant value parameter evaluates to an N-element row or column vector.

  • When you select this check box, the block outputs a vector of length N if the Constant value parameter evaluates to an N-element row or column vector. For example, the block outputs a matrix of dimension 1-by-N or N-by-1.

  • When you clear this check box, the block does not output a vector of length N if the Constant value parameter evaluates to an N-element row or column vector.

Programmatic Use

Block Parameter: VectorParams1D
Type: character vector
Values: 'on' | 'off'
Default: 'on'

Select to enable zero-crossing detection. For more information, see Zero-Crossing Detection.

Programmatic Use

Block Parameter: ZeroCross
Type: character vector, string
Values: 'off' | 'on'
Default: 'on'

Block Characteristics

Data Types

double

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

yes

Extended Capabilities

Introduced before R2006a