I'm looking at a problem which I already have the solution for. But when I compute the result by myself in Matlab the result becomes a little different.
The problem looks like this:
Consider the matrix equation Ax = b where A and b are given by
- The equation Ax = b can not be solved. Show why. (This is not the problem)
Two guesses of approximate solutions to Ax = b are:
Approximate solutions to Ax = b
- Determine which of the two proposed solutions is the best one in the least squares sense.
Solution:
The best solution of the two proposed solutions is found by direct calculation of their distances to the desired vector and comparing the result. This gives
The calculation which I can't compute
As the distance between Ax2 and b is much smaller than the distance between Ax1 and b, the error in using x2 as the solution is the smallest and x2 is therefore the better solution in the least squares sense
Here is my short calculation from Matlab:
The result i get is: 9,13 and not 9,6437
Am I wrong or what is the problem, please help!
Greetings Christian