%% Combine Arrays of Text
% You can combine string arrays or cell arrays of character vectors, element by element. Also, you can append a single piece of text to the elements of an input array.
% Create an array of file names.

names = ["data" "report" "slides"]

%
% Create an array of file extension names, with a different extension for each element of names.

ext = [".xlsx" ".docx" ".pptx"]

%
% Combine the file names and extensions.

str1 = append(names,ext)

%
% To append the same extension to each name, use a character vector or a string scalar.

str2 = append(names,'.mat')

% Copyright 2018 The MathWorks, Inc.