Hello folks.
I'm trying to port some Matlab code to C language. Currently I stuck on what Matlab defines as "Least-Squares Solution of Underdetermined System".
What I need is to understand is the algorithm behind that solution.
Here an example:
Solve a system of linear equations, A*X = B. Given A and B, calculate X. (Matlab code: X = A\B).
A:
B:
X (the solution):
Any help/ideas will be appreciated.
I'm trying to port some Matlab code to C language. Currently I stuck on what Matlab defines as "Least-Squares Solution of Underdetermined System".
What I need is to understand is the algorithm behind that solution.
Here an example:
Solve a system of linear equations, A*X = B. Given A and B, calculate X. (Matlab code: X = A\B).
A:
1 | 2 | 0 |
0 | 4 | 3 |
B:
8 |
18 |
X (the solution):
0 |
4 |
0.6667 |
Any help/ideas will be appreciated.