Periodic Number Problem Loosing Decimals
Afficher commentaires plus anciens
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??
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!