Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a matlab function for gaussian elimination based off of the following psuedo code function Gauss(n, (a ij) , (l i )) integer i, j,

Write a matlab function for gaussian elimination based off of the following psuedo code

function Gauss(n, (aij), (li))

integer i, j, k, n

real r, rmax, smax, xmult

real array (aij)1:n x 1:n, (li)1:n; real array allocate (si)1:n

for i = 1 to n

liimage text in transcribedi

smax image text in transcribed 0

for j =1 to n

smax image text in transcribedmax(smax, abs.value(aij)

end for

si image text in transcribed smax

end for

for k = 1 to n-1

rmax image text in transcribed 0

for i = k to n

r image text in transcribed abs. value (aij/sl_i) %l_i = li

if (r > rmax) then

rmax image text in transcribed r

j image text in transcribed i

end if

end for

lj image text in transcribedlk

for i = k +1 to n

xmult image text in transcribed al_i,k/al_k,k

al_i,k image text in transcribed xmult

for j = k+1 to n

al_i,j image text in transcribed al_i,j -(xmult)*al_k,j

end for

end for

end for

deallocate array (si)

end function Gauss

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_2

Step: 3

blur-text-image_3

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

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions