Calculate the roots of a quadratic equation, given coefficients a, b, and c, for the equation a*x^2 + b*x + c = 0.
Please supply more than one test case and check each and every problem before posting. The current test suite has the wrong answer for the only case and can, therefore, not be properly solved.
Test case 4 answer is wrong
Please modify the test case 4. It is wrong.
This problem has been fixed and is now solvable.
Applied a tolerance, which is crucial, since tiny variations in the least significant bits due to floating point arithmetic can cause a valid solution to fail.
Add two numbers
Back and Forth Rows
The Hitchhiker's Guide to MATLAB
Find the sum of the elements in the "second" diagonal
Getting logical indexes
Display negative numbers
kmph to mph converter
Linear system of equations
Determine the roots of a cubic equation
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office