Cody

Problem 2164. Roots

Solution 3884143

Submitted on 28 Nov 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
x = [1 5 8 9 7 4 5]; y_correct = roots(x); assert(isequal(return_root(x),y_correct)) x = [1 0 0 48 50]; y_correct = roots(x); assert(isequal(return_root(x),y_correct)) x = [11 55 4 6 ]; y_correct = roots(x) assert(isequal(return_root(x),y_correct))

Error using factor (line 20) N must be a scalar. Error in return_root (line 2) y = factor(x); Error in Test1 (line 3) assert(isequal(return_root(x),y_correct))

Suggested Problems

More from this Author4

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!