Mathlab and least square problem

  • Context: Undergrad 
  • Thread starter Thread starter hytuoc
  • Start date Start date
  • Tags Tags
    Square
Click For Summary
SUMMARY

The discussion centers on the accuracy of MATLAB in calculating the least squares solution for a given overdetermined system represented by matrix A and vector b. The user provided specific values for A, a 4x4 matrix, and b, a 4x1 vector, and calculated the residuals and null space. The inquiry focuses on MATLAB's methodology for selecting solutions in such scenarios, particularly when the system does not have a unique solution.

PREREQUISITES
  • Understanding of least squares solutions in linear algebra
  • Familiarity with MATLAB programming and its syntax
  • Knowledge of matrix operations, including residuals and null spaces
  • Concept of overdetermined systems in linear equations
NEXT STEPS
  • Explore MATLAB's 'lsqminnorm' function for least squares solutions
  • Learn about the Singular Value Decomposition (SVD) in MATLAB
  • Investigate the 'rank' function in MATLAB for assessing matrix properties
  • Study the implications of overdetermined systems in numerical analysis
USEFUL FOR

Mathematicians, engineers, data analysts, and anyone utilizing MATLAB for solving linear equations and optimizing least squares problems.

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?
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
8
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K