Question: This Numerical Methods question requires MATLAB. Please provide MATLAB code for this problem. Thank You! 3) Robustness (12 pts) Consider the version of the quadratic

This Numerical Methods question requires MATLAB. Please provide MATLAB code for this problem. Thank You!
This Numerical Methods question requires MATLAB. Please provide MATLAB code for this

3) Robustness (12 pts) Consider the version of the quadratic formula discussed in class. 1. Create a function that incorporates a flag parameter in addition to the a,b, and c inputs. For flag=1, the function applies the robust version of the quadratic formula, otherwise the function only apples the traditional quadratic formula. 2. Test the function for a=0,b=1, and c=2. Confirm that the traditional form of the equation throws a Nan error while the robust version does not. 3. Test the function for a=1, b=100, and c=1. Find the difference between the traditional and robust implementations for handling b ac as the 2-norm of the vector x that contains the roots. (Hint: use the norm command)

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!