strcat
Concatenates inputs s, ... and returns the result, R, which is of type string or cell array.
Syntax
R = strcat (s, ...)
Inputs
- s, ...
- For cell array inputs, the sizes need to match.
Outputs
- R
- Type: string | mat
Examples
R = strcat('These', 'are', 'concatenated', ' (with spaces)', 'strings.')
R = Theseareconcatenated (with spaces)strings.
strcat(69, 88, 65, 77, 80, 76, 69)
R = EXAMPLE
R = strcat(['S','t'], ['r'; 'i'; 'n'; 'g'])
R =
Str
Sti
Stn
Stg
R = strcat({'string1cell1 ', 'string2cell1 '}, {'string1cell2 ', 'string2cell2 '})
R =
{
[1,1] string1cell1 string1cell2
[1,2] string2cell1 string2cell2
}
Comments
Valid types for inputs are finite scalars, strings, matrices and cell arrays. For inputs which are finite scalars, the element in the result, R, will have the equivalent ASCII character. For inputs which are cell arrays, their sizes need to be the same.