The fix(x) command does not work
Ältere Kommentare anzeigen
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 Kommentar
John D'Errico
am 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???????
Akzeptierte Antwort
Weitere Antworten (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)
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!