2.6 LS Solution by Backslash Operator and QR Decomposition The backslash ("A\b') operator and the matrix left division (
Posted: Wed May 04, 2022 10:14 am
2.6 LS Solution by Backslash Operator and QR Decomposition The backslash ("A\b') operator and the matrix left division ('mldivide (A,b)") function turn out to be the most efficient means for solv- ing a system of linear equations as Eq. (P2.3.1). They are also capable of dealing with the under/over-determined cases. Let's see how they handle the under/over-determined cases. (a) For an underdetermined system of linear equations A₁x=b₁. - [14] (P2.6.1) X3 find the minimum-norm solution (2.1.7) and the solutions that can be obtained by typing the following statements in the MATLAB command window: >>A1 [1 2 3; 4 5 6]; b1 [14 321¹; >>x_mn = A1¹* (A1*A1')-1 b1, x pi= pinv (A1)*b1, x_bs = A1\b1 Are the three solutions the same? (b) For another underdetermined system of linear equations A₂x = b₂. [²8-4 (P2.6.2) find the solutions by using Eq. (2.1.7), the commands pinv(), and back- slash (\). If you are not pleased with the result obtained from Eq. (2.1.7). you can remove one of the two rows from the coefficient matrix A₂ and try again. Identify the minimum solution(s). Are the equations redundant or inconsistent? SYSTEM OF LINEAR EQUATIONS Table P2.6.1 Comparison of Several Methods for Computing the LS Solution QR LS: Eq. (2.1.10) pinv(A)"b A\b ||Ax-b|| # of flops 2.8788e-016 25 2.8788e-016 196 89 92 110