Effacer les filtres
Effacer les filtres

SIMULINK calculation accuracy with double (floating point) accuracy

1 vue (au cours des 30 derniers jours)
Dingguo Lu
Dingguo Lu le 29 Jan 2016
Commenté : Vineeth Kartha le 3 Fév 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 commentaire
Vineeth Kartha
Vineeth Kartha le 3 Fév 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by