Question: Use forward elimination to solve Ly = b for y via the algorithm for i = 1:n y_i = (b_i - sigma^i-1_j=1 L_ij y_j)/L_ii where

 Use forward elimination to solve Ly = b for y via

Use forward elimination to solve Ly = b for y via the algorithm for i = 1:n y_i = (b_i - sigma^i-1_j=1 L_ij y_j)/L_ii where L is a lower-triangular matrix of dimension n notelementof n, while b and y are vectors of dimension n. Use the MATLAB command y = zeros(n, 1) to initialize vector y. Code up the inner product sigma^i-1_j=1 L_ij y_j as, for example: summation = 0; for j = 1: i-1 summation = summation + L(I, j) * y(j); end This function must have the interface y = forward_elim (L, b) and it needs to verify that L is a square n notelementof n matrix with numeric values, while b is a column vector of compatible dimension n containing numeric values, where n is arbitrary, if not your code should terminate with an error. It should also terminate with an error if any diagonal element of matrix L is zero valued. If there are non-zero elements in the strictly upper-triangular part of matrix L, they are to be ignored

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!