Cody

Solution 998633

Submitted on 6 Oct 2016 by Jang geun Choi
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   Pass
x = [5 -3 -3 0]; y_correct = [0;1.13;-0.53]; assert(isequal(cross_zero(x),y_correct))

y = 0 1.1300 -0.5300

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

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

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

y = 0 -2.0000 -1.2800 0.7800