Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise. Write a MATLAB function myplu for PLU factorization by modifying the previous function mylu.m. function [L,U,P] = myplu (A) & MYPLU PLU factorization (demo

image text in transcribed
image text in transcribed
Exercise. Write a MATLAB function myplu for PLU factorization by modifying the previous function mylu.m. function [L,U,P] = myplu (A) & MYPLU PLU factorization (demo only--not stable!). & Input: square matrix & Output: P, L,U permutation, unit lower triangular, and upper triangular such that LUEPA % $ Your code here. % function [LU] mylu (A) % MYLU LU factorization (demo only--not stable!). % Input: A square matrix 8 Output: % LUunit lower triangular and upper triangular LUNA n = length(A); L = eye (n); $ ones on diagonal % Gaussian elimination for j = 1:n-1 for i = j+1:n L(1,1) - A(1,1) / A(1,1); * row multiplier Ali,j:n) = A(1,1:n) - L(1,3)+A(3, 1:n); end end U = triu (A); end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions