SIMULINK calculation accuracy with double (floating point) accuracy

1 Ansicht (letzte 30 Tage)
Dingguo Lu
Dingguo Lu am 29 Jan. 2016
Kommentiert: Vineeth Kartha am 3 Feb. 2016
I am using SIMULINK to simulate a model. While carrying out the calculation 50% of 2e-4, the ideal result is 1e-4, but the giving result is 9.9999999e-5. In other scenarios, the calculation errors are about 1.6e-20. I will need to compare the result again to a constant of 1-e4.
The Simulink solve is configured to discrete solver with a fixed-step of 2e-7. The calculation accuracy is set to double.
My question is how to set up in Simulink so that I can get exactly what I want as 1e-4, or whether there is a way I can round the given result to 1e-4, where I do not need so much accuracy.
  1 Kommentar
Vineeth Kartha
Vineeth Kartha am 3 Feb. 2016
Hi,
Provide more information like the version of MATLAB, type of OS, bitness of MATLAB and bitness of the OS that you are using(32 bit or 64 bit).
This will help other people from the community to solve the issue you are facing.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by