Unexpected output for fixed point datatypes, Simulink product block

Hi, Getting some weird output from Simulink product block for fixed point data type fixdt(1,16,0.1,0), Inputs to my product block are 6 and 1 both are of datatype ‘fixdt(1,16,0.1,0)’, I am keeping the same output datatype inside product block, and getting output as “6.1” instead of 6. Tried with all integer rounding methods but no success. When I give output datatype of some higher resolution inside product block or if I keep it as “Inherit: Inherit via internal rule” then I get correct output. I am not able to get what is the problem there for ‘fixdt(1,16,0.1,0)’ as it does support integer values like 6.

Réponses (0)

Question posée :

le 7 Nov 2014

Community Treasure Hunt

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

Start Hunting!

Translated by