Create a row vector a and a column vector b, then multiply them. The 1-by-3 row vector and 6-by-1 column vector combine to produce a 6-by-3 matrix with all combinations of elements multiplied.

A — Left array scalar | vector | matrix | multidimensional array

Left array, specified as a scalar, vector, matrix, or multidimensional
array. Numeric inputs A and B must
either be the same size or have sizes that are compatible (for example, A is
an M-by-N matrix and B is
a scalar or 1-by-N row vector).
For more information, see Compatible Array Sizes for Basic Operations.

If A and B are datetime,
duration, or calendar duration arrays, then they must be the same
size unless one is a scalar.

B — Right array scalar | vector | matrix | multidimensional array

Right array, specified as a scalar, vector, matrix, or multidimensional
array. Numeric inputs A and B must
either be the same size or have sizes that are compatible (for example, A is
an M-by-N matrix and B is
a scalar or 1-by-N row vector).
For more information, see Compatible Array Sizes for Basic Operations.

If A and B are datetime,
duration, or calendar duration arrays, then they must be the same
size unless one is a scalar.