Hi everybody,
I hope this message finds you well.
I have a matrix, let's say MAT, and I would like to make the product of the elements on each row and output the resulting vector in VEC.
So VEC i = product MAT[ i , 1:NCOL(MAT)].
I simply figured it out using a do loop as follows:
do i = 1 to nrow(MAT);
do r = 1 to ncol(MAT);
VEC [ i ,1]=VEC [i,1]*MAT[i,r];
end;
end;
But it takes too much time to run the above instructions since I have to run the same instructions 300,000 times (in different scenarios).
Do you have any better idea to optimize the runtime?
Thanks a lot in advance.
Raphaël