Simulink Reference | ![]() ![]() |
Library
Simulink Sources and Fixed-Point Blockset Sources
Description
The Constant block generates a real or complex constant value. The block generates a scalar, vector, or matrix output, depending on the dimensionality of the Constant value parameter and the setting of the Interpret vector parameters as 1-D parameter.
The output of the block has the same dimensions and elements of the Constant value parameter. If you specify a vector for this parameter, and you want the block to interpret it as 1-D, select the Interpret vector parameters as 1-D parameter.
When the Show additional parameters check box is selected, some of the parameters that become visible are common to many blocks. For a detailed description of these parameters, refer to Block Parameters in the Fixed-Point Blockset documentation.
Data Type Support
By default, a Constant block outputs a signal whose data type and complexity is the same as that of the block's Constant value parameter. However, you can specify the output to be any supported data type except int64
and uint64
.
Parameters and Dialog Box
int8(29)
. You can also choose a built-in data type from the drop-down list. Lastly, if you choose Specify via dialog
, the Output data type, Output Scaling Mode, and Output scaling value parameters become visible.Specify via dialog
is selected for the Output data type mode parameter.Specify via dialog
is selected for the Output data type mode parameter.Specify via dialog
is selected for the Output data type mode parameter, and if Use specified scaling
is selected for the Output Scaling Mode parameter.Conversions and Operations
The Constant value parameter is converted from its data type to the specified output data type offline using round-to-nearest and saturation. Refer to Parameter Conversions in the Fixed-Point Blockset documentation for more information about parameter conversions.
Characteristics
Dimensionalized |
Yes |
Direct Feedthrough |
No |
Sample Time |
Constant |
Scalar Expansion |
No |
Zero Crossing |
No |
![]() | Configurable Subsystem | Coulomb and Viscous Friction | ![]() |