MATLAB Answers

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?

1 view (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.

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.