The fix(x) command does not work
Afficher commentaires plus anciens
Why does the one not become a one when i fix it. I have tried everything but cant get it to work!
A=[4 2 3 1; 2 5 6 2; 0 0 1 3; -1 -2 9 8]
B=inv(A);
C=A*B;
C = fix(C)
D=B*A;
D = fix(D)
C==D

1 commentaire
John D'Errico
le 29 Nov 2020
Please don't post a PICTURE of code. That makes it impossible for people to copy what you did, and then use it as an example to help you. Is there a good reason why you WANT to make it more difficult for someone to help you???????
Réponse acceptée
Plus de réponses (1)
Just because a number is displayed as 1 in the default display format does not mean that the stored value is exactly 1. It's close but not exactly equal to 1. It's ever so slightly less than 1.
A=[4 2 3 1; 2 5 6 2; 0 0 1 3; -1 -2 9 8];
B=inv(A);
C=A*B;
1 - C(2, 2)
Catégories
En savoir plus sur Creating and Concatenating Matrices 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!