Cody

Solution 1068909

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

y_correct = 0 0 0 1 y = 1×4 logical array 0 0 0 1

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

y_correct = 1 0 0 1 y = 2×2 logical array 1 0 0 1

3   Pass
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 y = 2×3 logical array 1 1 1 1 1 1

Suggested Problems

More from this Author7