Cody

# Problem 42671. unique with nan

Solution 1101353

Submitted on 10 Jan 2017
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 = [2 NaN 3 5 NaN; 1 NaN 4 9 NaN; 8 -2 7 6 -2; 7 4 8 5 4];; y_correct = [2 NaN 3 5; 1 NaN 4 9; 8 -2 7 6; 7 4 8 5]; assert(isequalwithequalnans(unique_with_nan(x),y_correct))

Undefined function 'unique_with_nan' for input arguments of type 'double'. Error in TestPoint1 (line 9) assert(isequalwithequalnans(unique_with_nan(x),y_correct))

2   Fail
x = [1 0 0 1;NaN 1 0 NaN;NaN 0 1 NaN;0 0 0 0]; y_correct = [1 0 0;NaN 1 0;NaN 0 1;0 0 0]; assert(isequalwithequalnans(unique_with_nan(x),y_correct))

Undefined function 'unique_with_nan' for input arguments of type 'double'. Error in TestPoint2 (line 3) assert(isequalwithequalnans(unique_with_nan(x),y_correct))

3   Fail
x = [1 0 1 1 1 1 0;0 1 1 1 1 1 0;0 0 NaN NaN NaN NaN 0;0 0 NaN NaN NaN NaN 0;0 0 NaN NaN NaN NaN 0;0 0 0 0 0 0 0;0 0 0 0 0 0 1]; y_correct = [1 0 1 0;0 1 1 0;0 0 NaN 0;0 0 NaN 0;0 0 NaN 0;0 0 0 0;0 0 0 1]; assert(isequalwithequalnans(unique_with_nan(x),y_correct))

Undefined function 'unique_with_nan' for input arguments of type 'double'. Error in TestPoint3 (line 3) assert(isequalwithequalnans(unique_with_nan(x),y_correct))

4   Fail
x = [2 NaN 3 5 NaN; 1 NaN 4 9 NaN; 8 pi 7 6 pi; 7 eps 8 5 eps]; y_correct = [2 NaN 3 5; 1 NaN 4 9; 8 pi 7 6; 7 eps 8 5]; assert(isequalwithequalnans(unique_with_nan(x),y_correct))

Undefined function 'unique_with_nan' for input arguments of type 'double'. Error in TestPoint4 (line 9) assert(isequalwithequalnans(unique_with_nan(x),y_correct))

### Community Treasure Hunt

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

Start Hunting!