Cody

Solution 2333748

Submitted on 22 May 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 = [5 -3 -3 0]; y_correct = [0;1.13;-0.53]; assert(isequal(cross_zero(x),y_correct))

Undefined function 'vpa' for input arguments of type 'double'. Error in cross_zero (line 2) y=vpa(roots(x),2); Error in Test1 (line 3) assert(isequal(cross_zero(x),y_correct))

2   Fail
x = [1 2 3 4 5]; y_correct = [0.29 + 1.42i; 0.29 - 1.42i; -1.29 + 0.86i; -1.29 - 0.86i]; assert(isequal(cross_zero(x),y_correct))

Undefined function 'vpa' for input arguments of type 'double'. Error in cross_zero (line 2) y=vpa(roots(x),2); Error in Test2 (line 3) assert(isequal(cross_zero(x),y_correct))

3   Fail
x = [2 5 0 -4 0]; y_correct = [0; -2; -1.28; 0.78]; assert(isequal(cross_zero(x),y_correct))

Undefined function 'vpa' for input arguments of type 'double'. Error in cross_zero (line 2) y=vpa(roots(x),2); Error in Test3 (line 3) assert(isequal(cross_zero(x),y_correct))