|
|
|||
![]() |
Department of Engineering |
| University of Cambridge > Engineering Department > computing help |
Between [ and ] commas (or spaces) are used to put things
in rows, while semicolons (or line-breaks) put things in columns. So
b = [ 1 3 5; 2 4 6];creates a matrix with 2 rows and 3 columns.
Matrices can contain strings - e.g. A='bat'.
There are commands to create particular types of matrices - zeros, ones, eye, diag, rand, etc.
| | computing help | |