used function tabulate for a solution, however I got the following error : Undefined function 'tabulate' for input arguments of type 'double'. On the other hand this works quite well at my desktop version, can anyone explain why it is so.
Tabulate is in the Statistics Toolbox. http://www.mathworks.com/help/toolbox/stats/tabulate.html
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
%%
x = [1 2 5 2 2 7 8 3 3 1 3 8 8 8];
y_correct = [2 3];
assert(isequal(threeTimes(x),y_correct))
Error: Undefined function 'tabulate' for input arguments of type 'double'.
|
2 | Fail |
%%
x = [1 1 1];
y_correct = [1];
assert(isequal(threeTimes(x),y_correct))
Error: Undefined function 'tabulate' for input arguments of type 'double'.
|
3 | Fail |
%%
x = [5 10 -3 10 -3 11 -3 5 5 7];
y_correct = [-3 5];
assert(isequal(threeTimes(x),y_correct))
Error: Undefined function 'tabulate' for input arguments of type 'double'.
|
1313 Solvers
339 Solvers
151 Solvers
Pernicious Anniversary Problem
671 Solvers
710 Solvers