Cody

# Problem 43691. determine if

Solution 2330178

Submitted on 22 May 2020 by Laza Álmos
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 row = 1 col = 4 a = 0 0 0 0 a = 0 0 0 1 y = 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 row = 2 col = 2 a = 0 0 0 0 a = 1 0 0 0 a = 1 0 0 1 y = 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 row = 2 col = 3 a = 0 0 0 0 0 0 a = 1 0 0 0 0 0 a = 1 1 0 0 0 0 a = 1 1 1 0 0 0 a = 1 1 1 1 0 0 a = 1 1 1 1 1 0 a = 1 1 1 1 1 1 y = 1 1 1 1 1 1

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!