>> rand(5,3,2);An element or a slice of a multi-dimensional matrix can be referenced or reset using an indexing expression with appropriate number of indices. For example
>> x = rand(5,3,2); >> x[1, :, :]; // the first slice of x
Note that the only storage type available for multi-dimensional matrices is double precision floating point number. Therefore type does not need no be specified.
If two multi-dimensional matrices A and B have the same dimensions, A + B and A - B are defined the usual way. The only other operation defined for multi-dimensional matrix is scalar multiplication.