Cody

Solution 2056561

Submitted on 13 Dec 2019
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))

ans = -0.5300 0 1.1300

Assertion failed.

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))

ans = 0.2900 - 1.4200i 0.2900 + 1.4200i -1.2900 - 0.8600i -1.2900 + 0.8600i

Assertion failed.

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

ans = -2.0000 -1.2800 0 0.7800

Assertion failed.