Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
A = 'This is a test string. ';
y_correct = 'This is a test string.';
assert(isequal(rem_trail_ws(A),y_correct))
ans =
'This is a test string.'
|
2 | Pass |
A = ' Testing function rem_trail_ws';
y_correct = ' Testing function rem_trail_ws';
assert(isequal(rem_trail_ws(A),y_correct))
ans =
' Testing function rem_trail_ws'
|
3 | Pass |
A = {'MATLAB ','SIMULINK ';
'Toolboxes ','MathWorks '};
y_correct = {'MATLAB','SIMULINK';
'Toolboxes','MathWorks'};
assert(isequal(rem_trail_ws(A),y_correct))
ans =
2×2 cell array
{'MATLAB' } {'SIMULINK' }
{'Toolboxes'} {'MathWorks'}
|
4 | Pass |
A = sprintf('MATHWORKS \t');
y_correct = 'MATHWORKS';
assert(isequal(rem_trail_ws(A),y_correct))
ans =
'MATHWORKS'
|
Find nearest prime number less than input number
269 Solvers
Generate a vector like 1,2,2,3,3,3,4,4,4,4
3625 Solvers
Generate a random matrix A of (1,-1)
211 Solvers
The sum of the numbers in the vector
426 Solvers
480 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!