When using fixed-point data types with the "Product", "Matrix Multiply", and "Gain" blocks in Simulink, what determines the data type of the intermediate products and sums?

3 views (last 30 days)
I am using the "Product" block to perform matrix multiplication on fixed-point matrices and vectors. Are the intermediate products and sums carried out at a higher precision than the input and output data types?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
When using fixed-point data types with the "Product", "Matrix Multiply", and "Gain" blocks within Simulink and the Signal Processing Blockset, the precision of the multiplication and addition operations within the blocks is determined by the output signal data type.
If you want these operations to be carried out with higher precision, you can use a "Product block" (for instance) followed by a "Data Type Conversion" block. Set the output signal of the "Product" block to have a fixed-point data type with the precision you require, and the output signal of the "Data Type Conversion" block to have your original output data type.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!