DSP Blockset    
DSP Constant

Generate a discrete-time or continuous-time constant signal.

Library

DSP Sources

Description

The DSP Constant block generates a signal whose value remains constant throughout the simulation. The Constant value parameter specifies the constant to output, and can be any valid MATLAB expression that evaluates to a scalar, vector, or matrix.

When a row vector or column vector is specified for the Constant value parameter, and the Interpret vector parameters as 1-D check box is selected, the dimension of the Constant value vector is disregarded, and the output is a 1-D vector. When the Interpret vector parameters as 1-D check box is not selected, the output dimension is constrained to match the Constant value dimension (row or column). When the Constant value is an M-by-N matrix with M >1 and N >1, the output is always M-by-N.

When Sample mode is set to Continuous, the output is a continuous-time signal. When Sample mode is set to Discrete, the Sample time and Frame-based output parameters are enabled, and signal has the discrete output period specified by the Sample time parameter.

When the Frame-based output check box is selected, the output is frame-based; otherwise, the output is sample-based. Because a 1-D vector signal cannot be frame-based, an active Frame-based output setting overrides an active Interpret vector parameters as 1-D setting, and the output is a frame-based column vector (regardless of the actual Constant value vector dimension).

Dialog Box

Constant value
The constant to generate. Values entered here can be tuned, but their dimensions must remain fixed.
Interpret vector parameters as 1-D
When selected, generates 1-D vector outputs for Constant value settings with vector dimension; when unselected, generates 2-D vector outputs for Constant value settings with vector dimension. An active Interpret vector parameters as 1-D setting is overridden by an active Frame-based output setting.
Sample mode
The sample mode of the output, Discrete for a discrete-time signal or Continuous for a continuous-time signal.
Sample time
The discrete sample-period for sample-based outputs, or the discrete frame-period for frame-based outputs. This parameter is enabled when Discrete is selected in the Sample mode menu.
Frame-based output
Specifies frame-based output when selected. This parameter is enabled when Discrete is selected in the Sample mode menu

See Also

Constant
Simulink
Signal From Workspace
DSP Blockset

See Creating Signals Using Constant Blocks for related information.


 Downsample Dyadic Analysis Filter Bank