Cody

Solution 1568384

Submitted on 24 Jun 2018 by bainhome
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   Pass
x = rand; assert(isequal(cellnum(x),{x}))

2   Pass
for ii=1:10 x = rand(1,randi([2 100])); assert(isequal(cellnum(x),{x})) end

3   Pass
for ii=1:10 x = rand(randi([2 100]),1); assert(isequal(cellnum(x),{x})) end

4   Pass
for ii=2:10 x = magic(ii); assert(isequal(cellnum(x),{x})) end

5   Pass
for ii=1:10 x = num2cell(rand(1,randi(100))); assert(isequal(cellnum(x),x)) end

6   Pass
x = mat2cell(hankel(1:100),[10*ones(1,10)],[10*ones(1,10)]); assert(isequal(cellnum(x(:)),x(:)))