Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need code problem c Question 2 (opts): Solve the system of linear equation hif 2x+y+4z = 10 x + 2y-5z = 1 3x-2y-4z =

I need code problem c image text in transcribed
Question 2 (opts): Solve the system of linear equation hif 2x+y+4z = 10 x + 2y-5z = 1 3x-2y-4z = 8 a) using inv or mldivide in Matlab b) Use the function GaussPivot.m function xGaussPivot (A, b) GaussPivot: Gauss elimination pivoting % x-GaussPivot (A,b): Gauss elimination with pivoting. 8 input: A coefficient matrix 8 b-right hand side vector % output: % x-solution vector [m, n]-size (A) nb-n+1: Aug-[A bl 8 forward elimination for k- 1:n-1 for i - k+1:n factor-Aug(i,k) /Aug (k, k) Aug (i, k:nb) -Aug(i, kinb)-factor Aug(k, kinb) end end back substitution x-zeros (n,1) x (n)-Aug (n, nb)/Aug (n, n) for i -n-1:-1:1 x(i) (Aug (i, nb) -Aug (i,i+l:n) *x (i+1:n))/Aug(,i) end c) Modify the code above to Gauss Elimination with Pivoting

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

Step: 3

blur-text-image

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 Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago