Overcome round-off errors in vector summation

2 次查看(过去 30 天)
Hey,
So I am running a simulation that produces three vectors. The vectors are the output of the ode23s function.
After producing the vectors I then add them, and they almost completely cancel out.
The vectors are of the order of magnitude of and the result of the summation should be of the order of magnitude .
The problem is that the value of "eps" for dobule number is about and the difference in my case is about .
Is there a way to overcome this problem?
I have no way of calculating directly the sum of the vectors in the simulation - I have to add them after the fact.
Thanks!

回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by