{}
Denotes a vector, matrix, string, or string array definition.
Syntax
{expr_1,expr_2,…,expr_n}
Operand
- expr_1, expr_2, ..., expr_n
 - A set of valid scalar, vector, matrix, string, or string array expressions.
 
Example
| Expression | Result | 
|---|---|
{1} | 
                                1 | 
                            
{1, 1+1,1+1+1} | 
                                1, 2, 3 | 
                            
{a=2}
  | 
                                {0, 3}, {1, 0} | 
                            
{{"This", "is ", "a ", "test"}} | 
                                {"This ","is ", "a ", "test"} | 
                            
Comments
If there is only one element within the braces, the result is a scalar expression. Multiple elements define a vector.
If there is only one vector within the braces, the result is a vector expression. Multiple vectors of the same dimension define a matrix of m rows by n vectors.
If there is only one string within the braces, the result is a string expression. Multiple strings define a string array.