I have simple question in matlab.
I have the equation : A*H=b
I know A and b
I try to use this expression:
H=A\b;
but I get wrong value: example:
A =
231 481
233 488
241 481
243 489
b =
11 31
6 20
21 31
18 22
And I get
H =
1.1627 0.2713
-0.5396 -0.0791
so
A*H
ans =
9.0386 24.6299
7.5868 24.6189
20.6659 27.3434
18.6745 27.2532
This is no b
From typing
help slashat the command prompt:So, the second paragraph applies to your case. In other words, there is no
Hthat can satisfyA*H = bfor your problem, but Matlab computes the best approximation to it (in a least-squares sense). So the result you get is correct.