Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 'MATLAB ';
y_correct = 'MATLAB';
assert(isequal(white_space_removal(x),y_correct))
x =
MATLAB
|
2 | Pass |
x{1,1} = 'MATLAB ';
x{1,2} = 'SIMULINK ';
x{2,1} = 'Toolboxes ';
x{2,2} = 'MathWorks ';
y{1,1} = 'MATLAB';
y{1,2} = 'SIMULINK';
y{2,1} = 'Toolboxes';
y{2,2} = 'MathWorks';
assert(isequal(white_space_removal(x),y))
x =
'MATLAB' 'SIMULINK '
'Toolboxes ' 'MathWorks '
x =
'MATLAB' 'SIMULINK '
'Toolboxes' 'MathWorks '
x =
'MATLAB' 'SIMULINK'
'Toolboxes' 'MathWorks '
x =
'MATLAB' 'SIMULINK'
'Toolboxes' 'MathWorks'
|
3 | Pass |
NL = char(0);
TAB = char(9);
x = [NL 32 TAB NL 'AB' 32 NL 'CD' NL 32 TAB NL 32];
y = [NL 32 TAB NL 'AB' 32 NL 'CD'];
assert(isequal(white_space_removal(x),y))
x =
AB CD
|
6065 Solvers
What is the next step in Conway's Life?
640 Solvers
The Answer to Life, the Universe, and Everything
383 Solvers
484 Solvers
251 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!