This function finds the least squares solution to the overdetermined system Ay = b where the matrix A has more rows than columns or number of equations is more than the number of unknowns.
[y,res] = lsqod(A,b,c)
output Array containing the least squares solution to the overdetermined system.
residual error.
Array of constant terms present in the equations on RHS.
Array containing the coefficients of unknowns in the equations. The number of elements in A must be equal to the product of number of unknowns and number of elements in b.
Number of unknowns.
This function finds the least squares solution to the overdetermined system Ay = b using QR decomposition method where the matrix A has more rows than columns or number of equations is more than the number of unknowns. This function factorizes the A into the QR decomposition A = QR. On output the diagonal and upper triangular part of the input matrix contain the matrix R. The columns of the lower triangular part of the matrix A contain the Householder vectors which encode the orthogonal matrix Q.