Skip to content

Matrices and arrays

Create a matrix with spaces for columns and semicolons for rows:

A = [1 2 3; 4 5 6];
size (A)

Many element-wise operations use a dot prefix, for example .* for element-wise multiply. Use help .* or the reference for details.

Get Started