Given a quadratic equation ax^2 + bx + c = 0, write a function to return its roots.
Second test case is faulty
This problem has been edited and is now solvable.
Perhaps the name of the function needs to be changed?
Agreed. The Test Suite is failing because it is (now) calling the built-in MATLAB function roots(p). https://mathworks.com/help/matlab/ref/roots.html
I don't think this problem will pass anytime as the test suite is faulty. In assertion your_function(x) is used and when i test my code Undefined function or variable 'x' occurs.
How to find the position of an element in a vector without using the find function
Number of 1s in the Binary Representation of a Number
Project Euler: Problem 8, Find largest product in a large string of numbers
Make an awesome ramp for a tiny motorcycle stuntman
Sophie Germain prime
Calculate Simple Intrest for given data
volume of torus
Rank of matrix
Throw common elements of two vector arrays
Change number representation to HEX
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