Question: Using Matlab, Write a function MYLU to perform LU factorization for an arbitrary nn matrix (under the assumption that elimination can be performed without row

Using Matlab, Write a function MYLU to perform LU factorization for an arbitrary nn matrix (under the assumption that elimination can be performed without row exchanges). Run the function on the input (Please base the code off of the templet shown below)

Thanks

Using Matlab, Write a function MYLU to perform LU factorization for anarbitrary nn matrix (under the assumption that elimination can be performed without

% MYLU-The function in this m-file computes an LU factorization % of an n x n matrix under the assumption that elimination can be % performed without row exchanges. % Input: n x n matrix A. % Output: lower triangular matrix L and upper triangular matrix U. function [L,U] = MYLU (A) n = L = U % Get the row or column dimension of A. % Initialize L. % Initialize U. % Perform elimination. % The nested for loops fix a column first, and then go to each row. for j= % Span certain columns of A. for i= % span certain rows of A. L( ) = U ) = % Do not forget the semicolons here % to suppress intermediate output! end end end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!