Problem 43663. Combine the first and last names
MATLAB R2016 provides a rich set of functions to work with string arrays. In this problem, you will be given two string arrays of the first names and last names. Your job is to join the first names with the corresponding last names, and output a new string array.
For example, if the inputs are
firstnames = ["Donald"; "Hillary"]; lastnames = ["Trump"; "Clinton"];
the output should be:
names = ["Donald Trump"; "Hillary Clinton"];
Solution Stats
Problem Comments
- 
		2 Comments
 
		Robert Wagner
    	on 31 Oct 2023
	
	
  	the multitude of functionalities of strcat ist amazing!
		Robert Wagner
    	on 31 Oct 2023
	
	
  	is C++'s really the same? Actually didn't know it.
Solution Comments
Show commentsProblem Recent Solvers162
Suggested Problems
- 
         
Find common elements in matrix rows
2689 Solvers
 - 
         
         
655 Solvers
 - 
         
First non-zero element in each column
920 Solvers
 - 
         
Create a vector whose elements depend on the previous element
749 Solvers
 - 
         
Find the dimensions of a matrix
545 Solvers
 
More from this Author29
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!