# MATLAB: Multiply each item of an array with every item of another array

multiply vectorsvector items

Dear matlab community,
I have a relatively simple problem:
I have two arrays, say:
1
2
3
and
10
11
12
I would like to multiply each of the first vector items with every of the second vector items, and print a new vector, which gives the output:
1*10
1*11
1*12
2*10
2*11
2*12
3*10
3*11
3*12
Thank you very much, I appreciate your help!
Greetings from Australia,
Chris

m1 = [1;2;3]m2 = [10;11;12]out = m1 * m2'% Make into column vectorout = out(:)