We want to explore the accuracy of MATLABs solution to the following set of equations for values
Question:
We want to explore the accuracy of MATLAB’s solution to the following set of equations
for values of ϵ from 10−1 to 10−15. For this problem, you are allowed to use the slash command to solve the system of equations and the cond function to compute the condition number.
Write a MATLAB function that computes the condition number and the relative error in the value of x3 as a function of ϵ. The error in x3 should be computed by the formula
where x3compute is the value obtained in MATLAB and x3exact is the exact solution for x3 that you obtained by solving this system by hand using Gauss elimination. Your program should make (i) a log–log plot of the condition number versus epsilon and (ii) a log–log plot of the relative error versus the condition number.
Step by Step Answer:
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis