Cody

Solution 118134

Submitted on 24 Jul 2012
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
%% assert(isequal(ecount(1:10,2),1))

Error: Undefined function 'isNaN' for input arguments of type 'double'.

2   Fail
%% assert(isequal(ecount([1 1 1 1 1 1 1 1],1),8))

Error: Undefined function 'isNaN' for input arguments of type 'double'.

3   Fail
%% assert(isequal(ecount([1 1 1 1 1 1 1 1],2),0))

Error: Undefined function 'isNaN' for input arguments of type 'double'.

4   Fail
%% assert(isequal(ecount([1 1 1 1 NaN NaN 1 1],NaN),2))

Error: Undefined function 'isNaN' for input arguments of type 'double'.

5   Fail
%% assert(isequal(ecount([15 13 6 2 71 -5 -7 15],15),2))

Error: Undefined function 'isNaN' for input arguments of type 'double'.