Mathlab and least square problem

  • Thread starter Thread starter hytuoc
  • Start date Start date
  • Tags Tags
    Square
hytuoc
Messages
26
Reaction score
0
Does anyone know how accurate is MATLAB in calculating least square solution?
Thanks!
 
Physics news on Phys.org
A=[1,1,1;-1,3,1;2,3,-2;1,3,2] A is 4X4

b=[4;0;1;2] ; b is 4X1

I calculated x^ (residual of x) to be [1.4127; -.0159; .8889]
r(x^) = b-A*x^ = [1.7143; 0.5714; 0; -1.1429]
Nul(A')=[-1.5;-.5;0;1]
so how accurate is MATLAB in calculating least square solution?
 
anyone know the answer to my question above?
 
Are you asking how does Matlab choose the solution when you give it an overdetermined system?
 
Back
Top