How to use least squares method in Matlab?
问题 I have 37 linear equations and 36 variables in the form of a matrix equation; A*X=B . The equations don't have an exact answer. I want to use Matlab least square method to find the answers with the least error. I am new to Matlab so any comments will help. Thank you 回答1: If A is of full rank, i.e. the columns of A are linearly independent, the least-squares solution of an overdetermined system of linear equations A * x = b can be found by inverting the normal equations (see Linear Least