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(:)))
|
Replace NaNs with the number that appears to its left in the row.
2018 Solvers
17120 Solvers
434 Solvers
746 Solvers
What is Sum Of all elements of Matrix
292 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!