Question: Using matlab and if/else statement please! Write a function that determines the real roots of a quadratic equation ax2 + bx + c = 0.
Using matlab and if/else statement please!

Write a function that determines the real roots of a quadratic equation ax2 + bx + c = 0. To calculate the roots of the equation, the function calculates the discriminant D, given by: D = b2-4ac If D> 0, the code should display "The equation has two roots" and print the values on a new line. If D 0, the code should display "The equation has one root.", and print the value on a new line. If D
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
