| Simulink Reference | ![]() |
Specify the attributes of a signal
Description
Objects of this class allow you to specify the attributes that a signal or discrete state should have, e.g., its data type, numeric type, dimensions, and so on. You do this by giving the signal or discrete state the same name as the base (MATLAB) workspace variable that references the Simulink.Signal object. Then, whenever Simulink updates the diagram containing the signal or state, Simulink checks the actual properties of the signal against the properties specified by the signal object. For most properties, if the actual and specified properties are not the same, Simulink displays an error message. This enables you to quickly determine whether the actual attributes of your model's signals are the attributes you intend them to have.
In the case of a signal's storage class property, Simulink does not display an error if the model specifies the signal's storage class as auto (i.e., determined by Simulink) and the associated Simulink.Signal object specifies a different value. In this case, the value specified by the object overrides the value specified by the model. This allows you to use Simulink.Signal objects to control the visibility of signals (i.e., whether they are test points) from the MATLAB workspace (see Using Signal Objects to Designate Test Points).
Property Dialog Box
auto, specifies that Simulink, should determine the data type. Use the adjacent pull-down list to specify built-in data types (e.g., uint8). To specify a custom data type, enter a MATLAB expression that specifies the type, e.g., a base workspace variable that references a Simulink.NumericType object or a Simulink data type function (e.g., sint(16)) that returns a MATLAB structure that defines the custom data type.
-1 (the default) specifying any dimensions, N specifying a vector signal of size N, or [M N] specifying an MxN matrix signal.
auto (determined by Simulink), real, or complex.
Properties
| Name |
Access |
Description |
DataType |
RW |
String specifying the name of the data type of this signal. (Data type) |
Dimensions |
RW |
Scalar or vector specifying the dimensions of this signal. (Dimensions) |
Complexity |
RW |
String specifying the numeric type of this signal. Valid values are 'auto', 'real', or 'complex'. (Complexity) |
Min |
RW |
Minimum value that this signal can have. (Dimensions) |
Max |
RW |
Maximum value that this signal can have. (Maximum) |
DocUnits |
RW |
Measurement units in which this signal's value is expressed. (Units) |
RTWInfo |
RW |
Information used by Real-Time Workshop for generating code for this signal. The value of this property is an object of Simulink.ParamRTWInfo class. |
SampleTime |
RW |
Rate at which this signal should be updated. (Sample time) |
Sampling Mode |
RW |
Sampling mode of this signal. (Sample mode) |
| Simulink.ScopeDataLogs | Simulink.StructElement | ![]() |
© 1994-2005 The MathWorks, Inc.