Question: Write a matlab function myquad(a,b,c) that returns the roots of a quadratic equation ax2 + bx +c=0. The algorithm you need to use: . Test

 Write a matlab function myquad(a,b,c) that returns the roots of a

Write a matlab function myquad(a,b,c) that returns the roots of a quadratic equation ax2 + 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- Ifa 0, (the equation is not a true quadratic) two situations exist If b = 0, it is the case of a trivial solution o Else, we have a case with a single root =-c/b If a 0, three situations exist depending on the value of the discriminant, d=b2-4ac, o If d = 0, we have two equal real roots o If d>0, we have two unequal real roots o 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!