Left matrix multiplication giving wrong answer (off by 0.125)
6 views (last 30 days)
Show older comments
When I have
A= [ 0.401792457631424 0.095713396253060 0.115003590060302
-0.118005996178075 -0.395819173484325 0.252104651817522
-0.283786461453348 0.300105777231265 -0.367108241877824];
b=[1; 0; 0];
x=A\b;
when I take
A*x
I don't get b back:
>> A*x
ans =
1.000000000000000
0.125000000000000
0
Does anyone have any ideas on what could be wrong here?
The problem persists if I use e.g. b=[1.000000000001; 0; 0], though in that case I get
>> A*x
ans =
0.968750000000000
0.125000000000000
0.125000000000000
0 Comments
Accepted Answer
Sean de Wolski
on 3 Nov 2011
rank(A)
% ans = 2
shows that there are only two linearly independent rows of A, it ideally would be 3 for a 3x3 matrix.
doc rank
for more info.
0 Comments
More Answers (0)
See Also
Categories
Find more on Linear Algebra 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!