Cody

# Problem 42593. Create cell array of numeric arrays

Solution 733042

Submitted on 10 Sep 2015 by goc3
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}))

x = [0.9328]

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

x = [1x63 double] x = [1x78 double] x = [1x84 double] x = [1x39 double] x = [1x35 double] x = [1x14 double] x = [1x24 double] x = [1x20 double] x = [1x47 double] x = [1x84 double]

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

x = [82x1 double] x = [83x1 double] x = [14x1 double] x = [87x1 double] x = [41x1 double] x = [37x1 double] x = [68x1 double] x = [31x1 double] x = [7x1 double] x = [63x1 double]

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

x = [2x2 double] x = [3x3 double] x = [4x4 double] x = [5x5 double] x = [6x6 double] x = [7x7 double] x = [8x8 double] x = [9x9 double] x = [10x10 double]

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(:)))