Cody

# Problem 43663. Combine the first and last names

Solution 1765744

Submitted on 28 Mar 2019 by Abdelfatah Teamah
• Size: 8
• 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
assessFunctionAbsence('regexp','FileName','fullname.m')

2   Pass
firstnames = string({'Donald';'Hillary'}); lastnames = string({'Trump';'Clinton'}); y_correct = string({'Donald Trump';'Hillary Clinton'}); assert(isequal(fullname(firstnames,lastnames),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 fullname (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)]

3   Pass
firstnames = string({'Bill','Hillary'}); lastnames = string('Clinton'); y_correct = string({'Bill Clinton','Hillary Clinton'}); assert(isequal(fullname(firstnames,lastnames),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 fullname (line 2) In ScoringEngineTestPoint3 (line 4) In solutionTest (line 7)]

4   Pass
firstnames = string({'Donald';'Barron';'Eric'}); lastnames = string('Trump'); y_correct = string({'Donald Trump';'Barron Trump';'Eric Trump'}); assert(isequal(fullname(firstnames,lastnames),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 fullname (line 2) In ScoringEngineTestPoint4 (line 4) In solutionTest (line 9)]

5   Pass
firstnames = string('Mike'); lastnames = string({'Tyson','Pence','Trout'}); y_correct = string({'Mike Tyson','Mike Pence','Mike Trout'}); assert(isequal(fullname(firstnames,lastnames),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 fullname (line 2) In ScoringEngineTestPoint5 (line 4) In solutionTest (line 11)]

6   Pass
firstnames = string({'Donald','Hillary';'Mike','James'}); lastnames = string({'Trump','Clinton';'Pence','Bond'}); y_correct = string({'Donald Trump','Hillary Clinton';'Mike Pence','James Bond'}); assert(isequal(fullname(firstnames,lastnames),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 fullname (line 2) In ScoringEngineTestPoint6 (line 4) In solutionTest (line 13)]