The fix(x) command does not work
이전 댓글 표시
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
John D'Errico
2020년 11월 29일
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???????
채택된 답변
추가 답변 (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)
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!