Cody

Solution 188571

Submitted on 9 Jan 2013
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: All of the input arguments must be of the same size and shape. Previous inputs had size 10 in dimension 2. Input #3 has size 1.
2   Fail
%% assert(isequal(ecount([1 1 1 1 1 1 1 1],1),8))
Error: All of the input arguments must be of the same size and shape. Previous inputs had size 8 in dimension 2. Input #3 has size 1.
3   Fail
%% assert(isequal(ecount([1 1 1 1 1 1 1 1],2),0))
Error: All of the input arguments must be of the same size and shape. Previous inputs had size 8 in dimension 2. Input #3 has size 1.
4   Fail
%% assert(isequal(ecount([1 1 1 1 NaN NaN 1 1],NaN),2))
Error: All of the input arguments must be of the same size and shape. Previous inputs had size 8 in dimension 2. Input #3 has size 1.
5   Fail
%% assert(isequal(ecount([15 13 6 2 71 -5 -7 15],15),2))
Error: All of the input arguments must be of the same size and shape. Previous inputs had size 8 in dimension 2. Input #3 has size 1.