join
Combine strings
Syntax
Description
combines the text in newStr = join(str)str by joining consecutive elements of the
input array, placing a space character between them. str can be a
string array or a cell array of character vectors. newStr has the
same data type as str.
If
stris a1-by-Nor anN-by-1string array or cell array, thennewStris a string scalar or a cell array that contains one character vector.If
stris anM-by-Nstring array or cell array, thennewStris anM-by-1string array or cell array.
For a string or cell array of any size, join concatenates
elements along the last dimension of str with a size that does
not equal 1.
combines the text in newStr = join(str,delimiter)str and places the elements of
delimiter between the elements of str
instead of a space character.
If the delimiter argument is an array of different delimiters,
and str has N elements along the dimension
that is joined, then delimiter must have N–1
elements along the same dimension. The other dimensions of
delimiter must have either a size of 1 or
the same size as the corresponding dimension of str.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2016b