| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
S = strvcat(t1, t2, t3, ...)
S = strvcat(c)
S = strvcat(t1, t2, t3, ...) forms the character array S containing the text strings (or string matrices) t1,t2,t3,... as rows. Spaces are appended to each string as necessary to form a valid matrix. Empty arguments are ignored.
S = strvcat(c) when c is a cell array of strings, passes each element of c as an input to strvcat. Empty strings in the input are ignored.
If each text parameter, ti, is itself a character array, strvcat appends them vertically to create arbitrarily large string matrices.
The command strvcat('Hello','Yes') is the same as ['Hello';'Yes '], except that strvcat performs the padding automatically.
t1 = 'first'; t2 = 'string'; t3 = 'matrix'; t4 = 'second'; S1 = strvcat(t1, t2, t3) S2 = strvcat(t4, t2, t3) S1 = S2 = first second string string matrix matrix S3 = strvcat(S1, S2) S3 = first string matrix second string matrix
strcat, cat, vertcat, horzcat, int2str, mat2str, num2str, strings, special character []
![]() | structfun | sub2ind | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |