MATLAB: Multiplication of 2 sets to get all possible outcomes

combinationmultiplicationpossibilityset

Hello everyone!
I've been wondering how can I have all posible multiplication outcomes of 2 sets of numbers:
a = 0:0.01:0.2;
b = 0:pi/12:pi;
I want to know all 273 possible multiplications between a and b:
a*sin(b)
Does anyone have an idea how to make it?

Best Answer

a = 0:0.01:0.2;
b = 0:pi/12:pi;
[A,B]=meshgrid(a,sin(b));
C=A.*B;
c=unique(C(:)');%if you only want unique outcomes.