6. Consider the inconsistent linear system 72 4-5 210rs-19 (a) Enter the coeffic
ID: 3283018 • Letter: 6
Question
6. Consider the inconsistent linear system 72 4-5 210rs-19 (a) Enter the coefficient matrix A and the vector b into MATLAB for which this system is Ax b. Use the command M[A b] to enter the augmented matrix of the system, and then do a (b) We shall find a least-squares solution instead. As in the guide, enter the augmented matrix N of c) Compute the distance from Aw to b. This is the quantity that the least-squares solution mini (d) Choose a vector v whose entries are close to those of w, but different. Verify that the distance command to verify that the system is inconsistent the normal equations ATAx Ab. Use rref to find the least-squares solution mizes from Av to b is larger than the quantity from the previous part.Explanation / Answer
ANSWER
CODE:
clc
clear all
close all
A = [ 1 2 3 ; 4 5 6 ; 0 1 4; -1 1 10; 3 7 8 ]
B = [-2;0;-5;-19;6]
M = [A B]
Rank_M = rank (M)
X = AB
C = pinv(A)*B
B1 = A*C
SAMPLE OUTPUT:
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.