Periodic Number Problem Loosing Decimals
Show older comments
Hi, im solving a problem in which I need to different operations to a matrix and then compare the sum of each row to 1 (sum(A,2)==1) to see if its a transition matrix. However, in some operations i have to add periodic numbers, which make me loose decimales at the end of the program. Because of this when I compare the sum of each row which is 1.0000 to 1 it says its false. I know i could round it, however that wouldn`t be precise. Is there any form to make matlab represent the matrix numbers in a division so it doesn´t loose decimals??
Accepted Answer
More Answers (0)
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!