Matrix
A matrix is a rectangular table of values.
>> ones(2,3)
ans =
1 1 1
1 1 1
-
The elements of two matrices with the same dimensions can be added (+), subtracted (-), multiplied (.*), and divided(./).
>> ones(2,3) + ones(2,3)
ans =
2 2 2
2 2 2
Other operators: .^ < <= > >= == ~= & | ~
The empty matrix, written [], has height and width 0. The empty matrix results from requesting a non-positive height or width.