|
simulink里提供了转化方法,matlab里不知道怎么弄。
Fixed-Point Data Type and Scaling Notation
The following table provides a key for various symbols that may appear in Simulink products to indicate the data type and scaling of a fixed-point value.
Symbol
Description
uint
Unsigned integer fixed-point data type
sint
Signed integer fixed-point data type
ufrac
Unsigned fraction fixed-point data type
sfrac
Signed fraction fixed-point data type
ufix
Unsigned generalized fixed-point data type
sfix
Signed generalized fixed-point data type
fltu
Doubles-override of an unsigned fixed-point data type
flts
Doubles-override of a signed fixed-point data type
B
Bias
E
2^
e
10^
F
Fractional slope
n
Negative
p
Decimal point
S
Slope
Example: Port Data Type Display
For example, to display the data types of ports in your model, select Port/Signal Displays -> Port Data Types from the Simulink Format menu.
The port display for fixed-point signals consists of three parts: the data type, the number of bits, and the scaling. The data type and number of bits reflect the block's Output data type parameter value or the data type that is inherited from the driving block or through backpropagation. The scaling reflects the block's Output scaling value parameter value or the scaling that is inherited from the driving block or through backpropagation.
The model below displays its port data types:
The data type display associated with the In 1 block in the model indicates that the output data type is sfix(16) (a signed, 16-bit, generalized fixed-point number) with [Slope Bias] scaling of [0.2 10]. Note that this scaling is not the block's default scaling. The data type display associated with the In 2 block indicates that the output data type is sfix(16) with binary point-only scaling of 2^-6. |
|