Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Task 3: Create a Function for Crout (LU) Reduction (10 pts) Do not use any of MATLAB's built in functions or commands. This MUST implemented
Task 3: Create a Function for Crout (LU) Reduction (10 pts) Do not use any of MATLAB's built in functions or commands. This MUST implemented using matrix and vector components via FOR loops in your construction. Use Crout reduction to convert a square matrix A into the product of triangular matrices LU. Use the MATLAB commands L zeros(n) and UE eye(n) to initialize matrices L and U, and then preform a reduction by implementing the algorithm for k 1:n for i k:n LU for j k+1:n k j where A is a square matrix of dimension ngn, L will be a lower-triangular matrix of dimension nen and U will be an upper-triangular matrix of like dimension neAn. No pivoting is to be programmed into your code. This function must have the interface CL, UE crout LU (A) and it needs to verify that A is a square nAn matrix with numeric elements, where n is arbitrary; if not your code should terminate with an error. It should write a warning message to the command window if any diagonal element of the reduced matrix L is zero valued
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