Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = string({'I','love','MATLAB'});
y_correct = {'I','love','MATLAB'};
assert(isequal(str2cell(x),y_correct))
y =
1×3 cell array
{'I'} {'love'} {'MATLAB'}
|
2 | Pass |
x = string({'I','love'}); x(5) = 'MATLAB';
y_correct = {'I','love','','','MATLAB'};
assert(isequal(str2cell(x),y_correct))
y =
1×5 cell array
{'I'} {'love'} {0×0 char} {0×0 char} {'MATLAB'}
|
3 | Pass |
x = string([1 NaN 2]);
y_correct = {'1','','2'};
assert(isequal(str2cell(x),y_correct))
y =
1×3 cell array
{'1'} {0×0 char} {'2'}
|
4 | Pass |
x = strings(3);
x(1) = 'first';
x(end) = 'last';
y_correct = {'first', '', ''
'', '', ''
'', '', 'last'};
assert(isequal(str2cell(x),y_correct))
y =
3×3 cell array
{'first' } {0×0 char} {0×0 char}
{0×0 char} {0×0 char} {0×0 char}
{0×0 char} {0×0 char} {'last' }
|
Read a column of numbers and interpolate missing data
1235 Solvers
Back to basics 3 - Temp Directory
328 Solvers
Back to basics 21 - Matrix replicating
1052 Solvers
Implement simple rotation cypher
943 Solvers
Who is the smartest MATLAB programmer?
561 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!