# str2mat

## Purpose

Form string matrix from individual strings.

## Synopsis

    S = str2mat('t1','t2','t3',...)

## Description

`S = str2mat('t1','t2','t3',...)` forms the matrix `S` containing the text strings `t1,` `t2,` `t3,` etc. as rows. `str2mat` automatically pads each string with spaces in order to form a valid matrix. Up to 11 text strings can be used to form `S`. In addition, each text parameter, `tn`, can itself be a string matrix. This allows the creation of arbitrarily large string matrices.

## Examples

Form a string matrix from the strings `'One'`, `'Twenty'`, and `'Thirty-six'`:

    s = str2mat('One','Twenty','Thirty-six')

    s =
        One
        Twenty
        Thirty-six

## See Also

    int2str, isstr, num2str, setstr

(c) Copyright 1994 by The MathWorks, Inc.