Answered step by step
Verified Expert Solution
Question
1 Approved Answer
and to the one that you get in MATLAB by typing A ? ? b ( which d 0 e s d 0 partial pivoting
and to the one that you get in MATLAB by typing which
partial pivoting
Transcribed Image Text: and to the one that you partial pivoting CHAPTER t in MATLAB by typing Ab which does do
Let
and
Here we will see the effect of using a tiny element as a pivot. Gaussian elimination without pivoting
for solving linear systems Axb
A ; ; ; b ;
A ; ; ; ; b ; another example
n sizeA;
This is Step of Gaussian Elimination
for i:n Loop over rows below row
mult AiA; Subtract this multiple of row from
row i to make Ai
Ai: Ai:multA:; this line is equivalent to the "for loop:
for k:n Aik AikmultAk; end;
bi bi multb;
end
U A display U
All steps of Gaussian elimination
A ; ; ; b ;
A ; ; ; ; b ; another example
n sizeA;
for j:n Loop over columns.
for ij:n Loop over rows below j
mult AijAjj; Subtract this multiple of row j from
row i to make Aij
Ai: Ai: multAj:; This does more work than necessary! WHY?
bi bi multbj;
end
end the resulting A is an upper triangular matrix
U A display U
Modified Gaussian elimination
to avoid recomputing zeros
A ; ; b ; ;
A ; ; ; b ;
A ; ; ; ; b ; another example
n sizeA;
for j:n Loop over columns.
for ij:n Loop over rows below j
mult AijAjj; Subtract this multiple of row j from
row i to make Aij
Aij:n Aij:n multAjj:n; modified! no more recomputing of
of zeros in columns to j and rows j to n
bi bi multbj;
end
end the resulting A is an upper triangular matrix
U A display U
a By hand, solve the linear system exactly. Write your answer in
a form where it is clear what the approximate values of and are.
b In MATLAB, enter the matrix A and type condA to determine the
norm condition number of Would you say that this matrix is well
conditioned or ill conditioned in the norm?
c Write a MATLAB code or use one from the text that does not do
partial pivoting to solve the linear system Compare the
answer returned by this code to the one that you determined by hand
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started