Question
so i have two arrays . I need to figure outh how to multiply each value of the first array by each value in the second array. how doy ou do thtisT? thanks
Answers
Steve
just loop on the indexes. If the arrays x and y have m rows and n columns, then
for (i=1..m)
for(j=1..n)
z(i,j) = x(i,j)*y(i,j)
next j
next i
for (i=1..m)
for(j=1..n)
z(i,j) = x(i,j)*y(i,j)
next j
next i