如果矩形系数矩阵一个排名很低,那么最小二乘的问题是最小化的问题标准(A*X-B)具有无限的解决方案。万博 尤文图斯两种解决万博 尤文图斯方案由x1 = a \ bandx2 = pinv(a)*b。The distinguishing properties of these solutions are thatx1has only等级(A)非零组件,以及标准(x2)比其他任何解决方案都小。
The number chosen for the right-hand side, 260, is the value of the 8-by-8 magic sum for一个。如果一个were still an 8-by-8 matrix, then one solution for x would be a vector of 1s. With only six columns, a solution exists since the equations are still consistent, but the solution is not all 1s. Since the matrix is of low rank, there are infinitely many solutions.
使用后斜线求解两个解决方案万博 尤文图斯pinv。
x1 = a \ b
警告:排名不足,等级= 3,TOL = 1.882938E-13。
x1 =6×13.0000 4.0000 0 0 1.0000 0
x2 = pinv(a)*b
x2 =6×11.1538 1.4615 1.3846 1.3846 1.4615 1.1538
从某种意义上说,这两种解决方万博 尤文图斯案都是准确的标准(A*X1-B)andnorm(A*x2-b)处于圆形错误的顺序。解决方案x1之所以特别,是因为它只有三个非零元素。解决方案x2is special because标准(x2)比其他任何解决方案都小,包括标准(x1)。