Question: Problem 01: Write a MATLAB function myquad(a,b,c) that returns the roots of a quadratic equation ax?+ bx+c = 0. The algorithm you need to use:

 Problem 01: Write a MATLAB function myquad(a,b,c) that returns the roots

Problem 01: Write a MATLAB function myquad(a,b,c) that returns the roots of a quadratic equation ax?+ bx+c = 0. The algorithm you need to use: Test whether the equation is a true quadratic or not, by checking whether a is non-zero. If a=0, (the equation is not a true quadratic) two situations exist a. If b=0, it is the case of a trivial solution b. Else, we have a case with a single root ri=-c/b If a #0, three situations exist depending on the value of the discriminant, d=b24 ac, a. If d=0, we have two equal real roots. b. If d>0, we have two unequal real roots. c. If d

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!