Hi,

Newbie here, sorry if this is trivial, how can you multiply two vectors into a matrix (say a n1 times an 1m into a n*m) ? Just multiplying them will surely send an error since the order sets are different, is there a trick here?

With apologies, Thanks Sal.

Hi

For this you can use a double loop:

set i /i1*i4/, j /j1*j5/; parameter vector1(i), vector2(j), matrix(i,j); * Give some random values: vector1(i) = ord(i); vector2(j) = ord(j) loop(i, loop(j, matrix(i,j) = vector1(i) * vector2(j); ); ); display matrix;

Cheers Renger

Thanks ! This is very helpful !