Question: Need help fixing the following matlab code I keep getting different values they should be the same % # 1 Solving Ax = b %
Need help fixing the following matlab code I keep getting different values they should be the same
# Solving Ax b
There are several ways to solve Ax b in MATLAB. Consider the following:
A ; ; ; Use square brackets for a column vector
b ; ; ;
x Ab; MATLAB's default solver for Ax b
dispThe maximum difference between Ax and b is: numstrmaxabsAxb;
Ainverse invA; Finding the inverse of A
xinverse Ainverse b; Solve Ax b using the inverse of A
dispThe maximum difference using the inverse is: numstrmaxabsAxinverse b;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
