Cody

Solution 1833830

Submitted on 1 Jun 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 = [1 0 5 nan]; y_correct = [0 0 0 1] assert(isequal(my_function(x),y_correct))

y_correct = 0 0 0 1 x = 0 0 5 NaN x = 0 0 5 NaN x = 0 0 0 NaN x = 0 0 0 0

Output argument "y" (and maybe others) not assigned during call to "my_function". Error in Test1 (line 3) assert(isequal(my_function(x),y_correct))

2   Fail
x = [nan 1; 5 nan]; y_correct = [1 0;0 1] assert(isequal(my_function(x),y_correct))

y_correct = 1 0 0 1 x = 0 1 5 NaN x = 0 1 0 NaN

Output argument "y" (and maybe others) not assigned during call to "my_function". Error in Test2 (line 3) assert(isequal(my_function(x),y_correct))

3   Fail
x = [nan nan nan;nan nan nan]; y_correct = [1 1 1;1 1 1] assert(isequal(my_function(x),y_correct))

y_correct = 1 1 1 1 1 1 x = 0 NaN NaN NaN NaN NaN x = 0 NaN NaN 0 NaN NaN x = 0 0 NaN 0 NaN NaN

Output argument "y" (and maybe others) not assigned during call to "my_function". Error in Test3 (line 3) assert(isequal(my_function(x),y_correct))