strvcat
Returns a string matrix whose elements are the input arguments, vertically concatenated.
Syntax
R = strvcat (s, ...)
Inputs
- s, ...
- Type: scalar | string | mat | cell
Outputs
- R
- Type: string | mat
Examples
String
input:
R = strvcat('This', 'is', 'vertically', 'concatenated')
R =
This
is
vertically
concatenated
Scalar, string and cell array
inputs:
R = strvcat(75, 'strvat example', {65, 'Cell element 1', 'Cell element 2'})
R =
K
strvat example
A
Cell element 1
Cell element 2
Comments
The elements of the output array are padded with spaces, if needed, to make the length of each row consistent. For input arguments which are finite scalars, the element in the output array will have the equivalent ASCII character. For input arguments which are cell arrays, each element of the cell array forms a new row in the output array.