MathWorks Machine Translation
The automated translation of this page is provided by a general purpose third party translator tool.
MathWorks does not warrant, and disclaims all liability for, the accuracy, suitability, or fitness for purpose of the translation.
How to convert signals between built-in and fixed-point data types and illustrates how fixed-point data types affect the representable precision and range. The fixed-point data type used in this model is fixdt(1,5,2), which is a signed 5-bit number with 2 bits to the right of the binary point:
Convert from one fixed-point data type to another fixed-point data type. In this case the conversion is between sfix32_En2 and ufix8_En1, meaning:
Use the FixPt To FixPt Inherited block. Because Simulink® propagates data types throughout a block diagram, fixed-point utility modeling can be templatized for multiple use scenarios. The data type inheritance capability can be given additional information through the use of various relative-type specifications. The FixPt To FixPt Inherited block provides a way to specify that "this signal should have the same fixed-point data type as that signal" by wiring it up to the signals of interest.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office
Get trial now