Clear Filters
Clear Filters

Overcome round-off errors in vector summation

2 views (last 30 days)
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!

Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!