MATLAB: How to use ‘&’ between two different matrix

MATLABmatrix

For example
aa =
1 2 3
4 5 6
bb =
1 2
3 4
5 6
And I wanna create cc = aa & bb; But there's some problem they said ..
What does it means ? And how can i fix it ?

Best Answer

The dimensions of aa and bb are different. aa is 2X3 and bb is 3x2.. you have to transpose any of the matrix.
Eg:
cc = aa' & bb
or
cc = aa & bb'