Why is matlab giving me a a very small number when the answer should be EXACTLY zero ?
5 views (last 30 days)
Show older comments
I'm getting the number 1.4210854715202e-14 instead of getting a zero
I'm doing a procedure of 2 steps where i get a factor first and then multiply it by a vector
How can I stop this from happening ?
2 Comments
Answers (1)
Mark Sherstan
on 13 Dec 2018
The link here gives some ways to avoid it (basically solve with variables instead of numbers). This is just round off error and is common with computers / programming.
See Also
Categories
Find more on Logical 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!