Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A pseudocode to solve the matrix equation ax = b is given below. Here, a is an n times n matrix and b is
A pseudocode to solve the matrix equation ax b is given below. Here, a is an n times n matrix and b is an n times vector. Write a Matlab script you must name it GaussEl.m that uses this pseudocode to find the vector x
Note: Your function will be tested for
a
b
Make sure that one gets the correct results when they execute the command
x GaussEl;; You do not need to discuss results or the code on your report; make sure enough comments are available in your script.
FUNCTION x GaussElab
n number of entries in vector b
DOFOR k n
DOFOR i k n factor aikakk DOFOR j k n
aij aij factor akj END DO
bi bi factor bk END DO
END DO
xn bnann
DOFOR i n
sum bi
DOFOR j in
sum sum aij xj END DO
xi sumaii END DO
END GaussEl
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started