SIMULINK calculation accuracy with double (floating point) accuracy

1 次查看(过去 30 天)
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 个评论
Vineeth Kartha
Vineeth Kartha 2016-2-3
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by