Cody

Solution 1776592

Submitted on 7 Apr 2019 by Abdelfatah Teamah
  • Size: 7
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x = 'MATLAB '; y_correct = 'MATLAB'; assert(isequal(white_space_removal(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In white_space_removal (line 2) In ScoringEngineTestPoint1 (line 3) In solutionTest (line 3)]

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))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In white_space_removal (line 2) In ScoringEngineTestPoint2 (line 9) In solutionTest (line 5)]

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))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In white_space_removal (line 2) In ScoringEngineTestPoint3 (line 5) In solutionTest (line 7)]

Suggested Problems

More from this Author39