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

643 Solutions

169 Solvers

Last Solution submitted on Feb 26, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers169

Suggested Problems

More from this Author28

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!