Question

100 GAUSSIAN ELIMINAONO the system Ax = b (where A is n × n and nonsingular), MATLAB uses Gaussian elimination with partial pivoting to solve the system. If you want to see the LU decomposition, use the MATLAB command lu. Exercise 1.8.10 Use MATLAB to check the LU decomposition obtained in Example 1.8.2 Enter the matrix A, then type [L, U, P] = lu (A) . Once you have L, U, and P, you can put them back together by typing P*L*U. (In MATLAB the prime symbol, applied to a real matrix, means transpose) You can also try [K,V] = lu (A) , and see what that gives you. Give a matrix equation that relates K to L For a description of the lu command, type help lu or look in MATLABs help browser
0 0
Add a comment Improve this question Transcribed image text
Answer #1

I do not have example 1.8.2. So I am taking A as magic matrix of dimension 3X3.
You just need to substitute that A with the matrix given in example 1.8.2.

Command Window New to MATLAB? See resources for Getting Started. >>A-magic (3) IL,U,P1-lu (A) .0000 0.5000 0.3750 1.0000 0.54

Command Window New to MATLAB? See resources for Getting Started. >> K, V]-lu (A) .0000 0.3750 0.5000 0.5441 1.0000 1.0000 8.0

Command Window > L 1.0000 0.5000 0.3750 1.0000 0.5441 1.0000 1.0000 0.3750 0.5000 0.5441 1.0000 1.0000 ans 1.0000 0.5000 0.37A Command Window >> help lu lu lu factorization L,U] lu (A) stores an upper triangular matrix in U and a psychologically low

Hope it helps you

Please rate !!!

Add a comment
Know the answer?
Add Answer to:
100 GAUSSIAN ELIMINAONO the system Ax = b (where A is n × n and nonsingular),...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Need Help on Matlab matrix system. Have your code return the solution x and show this...

    Need Help on Matlab matrix system. Have your code return the solution x and show this solution in a command prompt printout. Note that you can, of course, check your answer easily with the Matlab backslash command, A\b. Naive LU Decomposition Now, starting with your functioning Gauss Elimination code, modify it to keep the factors in the same matrix that it is passed. You of course will not modify the b-vector. Have this code return the L and U matrices...

  • 3. Given the matrix [ -1 2 -1] A= 3 2 1 10 10 1 Following...

    3. Given the matrix [ -1 2 -1] A= 3 2 1 10 10 1 Following steps (a)(b) to obtain the LU decomposition of the matrix A with partial piv- oting (a) Apply the Gaussian elimination method with partial pivoting to obtain an upper trian- gular matrix U. Record the corresponding permutation matrix for each pivoting step, and the numbers lik used to eliminate the zeros in column k. (b) Based on (a), express the matrices P, L and U...

  • just 1,2,4 Problem 1 Consider the linear system of equations Ax = b, where x €...

    just 1,2,4 Problem 1 Consider the linear system of equations Ax = b, where x € R4X1, and A= 120 b = and h= 0.1. [2+d -1 0 0 1 1 -1 2+d -1 0 h2 0 -1 2 + 1 Lo 0 -1 2+d] 1. Is the above matrix diagonally dominant? Why 2. Use hand calculations to solve the linear system Ax = b with d=1 with the following methods: (a) Gaussian elimination. (b) LU decomposition. Use MATLAB (L,...

  • Function LUfac_solver.m is provided here: function [x] = LUfac_solver(LU,b,piv) % % function [x] = LUfac_solver(lu,b) %...

    Function LUfac_solver.m is provided here: function [x] = LUfac_solver(LU,b,piv) % % function [x] = LUfac_solver(lu,b) % % This program employs the LU factorization to solve the linear system Ax=b.   % % Input % LU: lu matrix from GEpivot_new function % b: right side column vector (ordered corresponding to original vector % sent to GEpivot_new) % piv: vector indicating the pivoting (row interchanges that took place % during GE % % Output % x: solution vector % % Written by Steve...

  • LU be an LU factorization of matrix A e Fn×n computed by the Gaussian elimination Let...

    LU be an LU factorization of matrix A e Fn×n computed by the Gaussian elimination Let PA with partial pivoting (GEPP). Let us denote Prove that (a) leyl 1, for all i >j S 2-1 maxij laijl You may assume P-1, i.e., in each step of the Gaussian elimination process the absolute value of the diagonal entry is already the largest among those of the entries below the diagonal entry on the same column You may prove the results with...

  • 4. Suppose that A Rnn is nonsingular. We can pose the problem of finding A-1 as...

    4. Suppose that A Rnn is nonsingular. We can pose the problem of finding A-1 as the system of linear equations where X e R" is the unknown inverse matrix. We assume that A has LU factorization A LU (a) Explain how we can use the LU factorization of A and the ear system (4.1.1) to calculate the inverse A-1 Hint: The system (4.1.1) is a system of n × n equations and n × n unknowns. Consider the linear...

  • Matlab Question. Please be detailed Write a user-defined function that performs LU decomposition (using Gauss Elimination...

    Matlab Question. Please be detailed Write a user-defined function that performs LU decomposition (using Gauss Elimination without partial pivoting) of a square matrix. Do not use built-in MATLAB functions lu( ), inv(), \, linsolve(). Matrices (in [A]*{x}={B} form) A=[15 -3 -1; -3 15 -6; -4 -1 12] B=[3800; 1200; 2350] Given code lines: function[L,U]=myLUFact_username(A) [m,n]=size(A); %numbers of rows/comlumns of A assert(m==n, 'A should be a square matrix');

  • In this exercise you will work with LU factorization of an matrix A. Theory: Any matrix A can be ...

    In this exercise you will work with LU factorization of an matrix A. Theory: Any matrix A can be reduced to an echelon form by using only row replacement and row interchanging operations. Row interchanging is almost always necessary for a computer realization because it reduces the round off errors in calculations - this strategy in computer calculation is called partial pivoting, which refers to selecting for a pivot the largest by absolute value entry in a column. The MATLAB...

  • Using MATLAB, develop an M-file to determine LU factorization of a square matrix with partial pivoting....

    Using MATLAB, develop an M-file to determine LU factorization of a square matrix with partial pivoting. That is, develop a function called mylu that is passed the square matrix [A] and returns the triangular matrices [L] and [U] and the permutation P. You are not to use MATLAB built-in function lu in your codes. Test your function by using it to solve a system of equations listed below in part 3. Confirm that your function is working properly by verifying...

  • stion 1: Figure out what the following MATLAB code does (Notice that R = LT) n=500:...

    stion 1: Figure out what the following MATLAB code does (Notice that R = LT) n=500: for jay- 1:4 if jay > 1; oldtime-time; end M = rand(n) t = cputime; for rep 1: R chol(A); end time-cputime-t if jay > 1; ratio = time/oldtime, end enc If you put these instructions into a file named, say, zap.m, you can run the program by typing zap from the MATLAB command line. The functions randn, cputime, and chol are built-in MATLAB...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT