Cody

# Problem 44613. Find NaNs in the matrix

Solution 2135635

Submitted on 21 Feb 2020
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 = 0./[6 4 0 3 -9]; y_correct = [0 0 1 0 0]; assert(isequal(return_nans(x),y_correct))

x = 0 0 0 0 0

Unrecognized function or variable 'ans'. Error in return_nans (line 3) ~ans Error in Test1 (line 3) assert(isequal(return_nans(x),y_correct))

2   Fail
x = [1 1 NaN NaN]; y_correct = [0 0 1 1]; assert(isequal(return_nans(x),y_correct))

x = 1 1 0 0

Unrecognized function or variable 'ans'. Error in return_nans (line 3) ~ans Error in Test2 (line 3) assert(isequal(return_nans(x),y_correct))

3   Fail
x =[1 1 NaN NaN; 5,2,3,NaN]; y_correct = [0 0 1 1; 0 0 0 1]; assert(isequal(return_nans(x),y_correct))

x = 1 1 0 0 5 2 3 0

Unrecognized function or variable 'ans'. Error in return_nans (line 3) ~ans Error in Test3 (line 3) assert(isequal(return_nans(x),y_correct))