Check Signal Attributes
Error when input signal does or does not match selected attributes exactly
Library
Signal Management / Signal Attributes
dspsigattribs
Description
The Check Signal Attributes block terminates the simulation with an error when the input characteristics differ from the characteristics you specify in the block parameters.
When you set Error when input to Does not match attributes
exactly
, the block generates an error when the input fails to match
any of the specified attributes. Only signals that possess
all of the specified attributes propagate to the output unaltered and do
not cause the block to generate an error.
When you set Error when input to Matches attributes
exactly
, the block generates an error only when the input possesses
all specified attributes. Signals that do not possess
all of the specified attributes propagate to the output unaltered, and do
not cause the block to generate an error.
Signal Attributes
The Check Signal Attributes block can test for up to five different signal attributes, as
specified by the following parameters. When you select Ignore
for any
parameter, the block does not check the signal for the corresponding attribute. For example,
when you set Complexity to Ignore
, neither real
nor complex inputs cause the block to generate an error. The attributes are:
Complexity
Check whether the input is real or complex. You can display this information in a model by attaching a Probe (Simulink) block with Probe complex signal selected. Alternatively, in the Debug tab, select Information Overlays > Port Data Type.
Dimensionality
Check the dimensionality of the input for compliance or noncompliance with the attributes in the subordinate Dimension menu. See the following table. M and N are positive integers unless otherwise indicated.
Dimensions Is... Is not... 1D
1D vector,
1D scalarMbyN matrix,
1byN matrix (row vector),
Mby1 matrix (column vector),
1by1 matrix (2D scalar)2D
MbyN matrix,
1byN matrix (row vector),
Mby1 matrix (column vector),
1by1 matrix (2D scalar)1D vector,
1D scalarScalar
(1D or 2D)1D scalar,
1by1 matrix (2D scalar)1D vector with length>1,
MbyN matrix with M>1 and/or N>1Vector
(1D or 2D)1D vector,
1D scalar,
1byN matrix (row vector),
Mby1 matrix (column vector),
1by1 matrix (2D scalar)
Vector (1D or 2D) or scalarMbyN matrix with M>1 and N>1
Row Vector
(2D)1byN matrix (row vector),
1by1 matrix (2D scalar)
Row vector (2D) or scalar1D vector,
1D scalar,
MbyN matrix with M>1Column Vector
(2D)Mby1 matrix (column vector), 1by1 matrix (2D scalar)
Column vector (2D) or scalar1D vector,
1D scalar,
MbyN matrix with N>1Full matrix
MbyN matrix with M>1 and N>1
1D vector,
1D scalar,
1byN matrix (row vector),
Mby1 matrix (column vector),
1by1 matrix (2D scalar)Square matrix
MbyN matrix with M=N,
1D scalar,
1by1 matrix (2D scalarMbyN matrix with M≠N,
1D vector,
1byN matrix (row vector),
Mby1 matrix (column vector)In the Debug tab, when you select Information Overlays > Signal Dimensions, Simulink^{®} displays the size of a 1D vector signal as an unbracketed integer, and displays the dimension of a 2D signal as a pair of bracketed integers,
[MxN]
. Simulink does not display any size information for a 1D or 2D scalar signal. You can also display dimension information for a signal in a model by attaching a Probe block with Probe signal dimensions selected.Data type
Check the signal data type for compliance
(Is...)
or noncompliance(Is not...)
with the attributes in the subordinate General data type menu. See the following table. You can individually select any of the specific data types listed in the(Is...)
column from the subordinate Specific data type menu.General Data Type Is... Is not... Boolean
boolean
single, double, uint8, int8, uint16, int16, uint32, int32
, fixed point, enumeratedEnumerated
A userdefined enumerated data type. See Data Types (Simulink). boolean, single, double, uint8, int8, uint16, int16, uint32, int32
, fixed pointFloating point
single, double
boolean, uint8, int8, uint16, int16, uint32, int32
, fixed point, enumeratedFloating point or Boolean
single, double, boolean
uint8, int8, uint16, int16, uint32, int32
, fixed point, enumeratedFixed point
fixed point,
uint8, int8, uint16, int16, uint32, int32
boolean, single, double
, enumeratedInteger
Signed integer
int8
,int16
,int32
Unsigned integer
uint8
,uint16
,uint32
boolean, single, double
, fixed point, enumeratedTo display data type information, in the Debug tab, select Information Overlays > Port Data Type.
Sample time
Check whether the signal is discrete time or continuous time. In the Debug tab, when you select Information Overlays > Colors, Simulink displays continuoustime signal lines in black or grey and discretetime signal lines in colors corresponding to the relative rate.
When you attach a Probe block with Probe sample time enabled to a continuoustime signal, the block icon displays
Ts:[0 To]
, whereTo
is the sample time offset. Valid values ofTo
for continuoustime signals are0
and1
. WhenTo
is0
, updates occur at every major and minor time step. WhenTo
is1
, updates occur only at major time steps and the sample time is fixed in minor time step.When you attach a Probe block with Probe sample time enabled to a discretetime signal, the block icon displays
Ts:[Ts To]
for samplebased signals, andTf:[Tf To]
for framebased signals.Ts
andTf
are the positive sample period and frame period, respectively.To
is the offset, such that 0 ≤offset
<period
. Framebased signals are almost always discrete time.
Parameters
 Error when input
Specify whether the block generates an error when the input does or does not possess all of the required attributes.
 Complexity
Specify the complexity for which you want to check the input,
Real
orComplex
. When you selectIgnore
from the list, the block does not check the complexity of the input. Dimensionality
Specify whether you want to check the input for compliance or noncompliance with the attributes in the subordinate Dimensions menu. When you select
Ignore
from the list, the block does not check the dimensionality of the input. Dimensions
Specify the dimensions for which you want to check the input. This parameter is only visible when you set the Dimensionality parameter to
Is...
orIs not...
. Data type
Specifies whether you want to check the input for compliance or noncompliance with the attributes in the subordinate General data type menu. When you select
Ignore
from the list, the block does not check the input data type. General data type
Specify the general data type for which you want to check the input. This parameter is only visible when you set the Data type to
Is...
orIs not...
. Specific floatingpoint
Specify the floatingpoint data type for which you want to check the input. This parameter is only visible when you set the General data type to
Floatingpoint
orFloatingpoint or boolean
. Specific fixedpoint
Specify the fixedpoint data type for which you want to check the input. This parameter is only visible when you set the General data type to
Fixedpoint
. Specific integer
Specify the integer data type for which you want to check the input. This parameter is only visible when you set the General data type to
Integer
. Sample time
Specify the sample time for which you want to check the input,
Discrete
orContinuous
. When you selectIgnore
from the list, the block does not check the sample time of the input.
Supported Data Types
Port  Supported Data Types 

Input 

Output 

See Also
Buffer  DSP System Toolbox 
Convert 1D to 2D  DSP System Toolbox 
Convert 2D to 1D  DSP System Toolbox 
Data Type Conversion (Simulink)  Simulink 
Inherit Complexity  DSP System Toolbox 
Probe (Simulink)  Simulink 
Reshape (Simulink)  Simulink 
Submatrix  DSP System Toolbox 