Question: Lab Exercise No. 3B Solution of Linear Equations using Nave Gaussian Elimination Use Naive Gauss elimination to solve 2016; +15x, +101, = 45 - 3x;

 Lab Exercise No. 3B Solution of Linear Equations using Nave Gaussian
Elimination Use Naive Gauss elimination to solve 2016; +15x, +101, = 45
- 3x; -2.248, +7x3 = 1.751 3x + xy + 3x, =

Lab Exercise No. 3B Solution of Linear Equations using Nave Gaussian Elimination Use Naive Gauss elimination to solve 2016; +15x, +101, = 45 - 3x; -2.248, +7x3 = 1.751 3x + xy + 3x, = 9 Write the following MATLAB code and during that answer the included questions: clo clear all In - number of equations --3; [A] - nxn coefficient matrix A-120,15,10; -3,-2.249.7; 5, 1,3); [RHS) - nxl right hand side array RHS=145; 1.751; 9): horzeat (Horizontal concatenation) will combine the [A] and [RS] # matrices into one augmented matrix C-horzcat (A,RHS) Question 1: What is the content of matrix C? Answer: ******** Back butitution Defining xa a vector. Y-zeros (1,n): Solving for the nth equation as it has only one unknown X(n) RHS1 (n)/A1 (nn) Solving for the remaining (4-1) unknown working backwards from the (n-1) th equation to the first equation for i-(n-1):-1:1 *Setting the series sin equal to zero. sum for 1-1+1:n sum-summ+A1(1,1) *%(); Generating the summation tem, at which time the unknowns that have theen solved for are used to calculate xi. X(1)-(RHS1 (i)-summ) A1 (1,1) end end Question 4: What are the values taken by X matrix? Answer: Question 5: What are the values for X1, X and X; in the following equations: 20x, +15x+10x, -45 - 3x, - 2.249x, +7x, = 1.751 5x + X: + 3x, -9 Creating the upper new coefficient matrix [A1] Al-zeros (n.n): for i-11n for 1-110 A1 (1,1) -C(1,1); ond end *Now the new right hand side array. [A1] RHS1-zeros (n. 1); for i-116 RHS1 (1,1)-(1. (n+1)); end AL RMS Question 3: What are the values of A1 and RHS1 matrices

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!