Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%% Example tested
input = 1:3;
output = {'1' '2' '3'};
assert(isequal(matrix2cell(input ),output))
assert(iscell(output),'output must be a cell')
a =
'1' [2] [3]
a =
'1' '2' [3]
a =
'1' '2' '3'
|
2 | Pass |
%%
input = 0:5:8
output = {'0' '5'};
assert(isequal(matrix2cell(input ),output))
assert(iscell(output),'output must be a cell')
input =
0 5
a =
'0' [5]
a =
'0' '5'
|
3 | Pass |
%% Matrix input
input =magic(3);
output = {'8' '1' '6'
'3' '5' '7'
'4' '9' '2'}
assert(isequal(matrix2cell(input ),output))
output =
'8' '1' '6'
'3' '5' '7'
'4' '9' '2'
a =
'8' [1] [6]
[3] [5] [7]
[4] [9] [2]
a =
'8' [1] [6]
'3' [5] [7]
[4] [9] [2]
a =
'8' [1] [6]
'3' [5] [7]
'4' [9] [2]
a =
'8' '1' [6]
'3' [5] [7]
'4' [9] [2]
a =
'8' '1' [6]
'3' '5' [7]
'4' [9] [2]
a =
'8' '1' [6]
'3' '5' [7]
'4' '9' [2]
a =
'8' '1' '6'
'3' '5' [7]
'4' '9' [2]
a =
'8' '1' '6'
'3' '5' '7'
'4' '9' [2]
a =
'8' '1' '6'
'3' '5' '7'
'4' '9' '2'
|
Remove the small words from a list of words.
672 Solvers
Find state names that start with the letter N
598 Solvers
Project Euler: Problem 2, Sum of even Fibonacci
835 Solvers
"Low : High - Low : High - Turn around " -- Create a subindices vector
320 Solvers
856 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!