Question: 22. Using your GaussianDown function and your SolveU function, solve the following system of linear equations: x1 +2x2+3x3+4x4= 4 -2:1-T2-2x3-324-3 x1+3x2+3x3+4x4= 5 using MATLAB functions

 22. Using your GaussianDown function and your SolveU function, solve the

22. Using your GaussianDown function and your SolveU function, solve the following system of linear equations: x1 +2x2+3x3+4x4= 4 -2:1-T2-2x3-324-3 x1+3x2+3x3+4x4= 5 using MATLAB functions %% Gaussian Down function P=GaussianDown(Q,r,c) %Pre: Q, r, c % Post: P the result [rowQ.colQ]=s.ze(Q); P=Q for i=(r+1):rowQ end; %%SolveU Function function [ x ] = SolveU( U,b ) %Pre: U is an invertible upper triangular matrix 96b a rhs column vector %Post:x is the solution of Ux-b [rowU,colU]-size(U); x-zeros(colU,1); %initialize variable current rhs-b for i=colU:-1:1 %From colU minus 1 at a time to 1. x()- current_rhs(i)/U(i,i); current_rhs-current_rhs-(x(i)*U(:.i); end 22. Using your GaussianDown function and your SolveU function, solve the following system of linear equations: x1 +2x2+3x3+4x4= 4 -2:1-T2-2x3-324-3 x1+3x2+3x3+4x4= 5 using MATLAB functions %% Gaussian Down function P=GaussianDown(Q,r,c) %Pre: Q, r, c % Post: P the result [rowQ.colQ]=s.ze(Q); P=Q for i=(r+1):rowQ end; %%SolveU Function function [ x ] = SolveU( U,b ) %Pre: U is an invertible upper triangular matrix 96b a rhs column vector %Post:x is the solution of Ux-b [rowU,colU]-size(U); x-zeros(colU,1); %initialize variable current rhs-b for i=colU:-1:1 %From colU minus 1 at a time to 1. x()- current_rhs(i)/U(i,i); current_rhs-current_rhs-(x(i)*U(:.i); 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!