Hello to All,
I am trying to work and understand 4D arrays. Lets say I have two 3D gpuArrays a(100x5x5) and b(5x5x5). I would like to multiply them that it would result in 4D array c(100x5x5x5), and example of multiplication:
For j=1:5For i=1:5c(:,:,i,j)=a(:,i,j)*b(i,:,j)endend
What would be the way to achieve this. I am trying to go for 4D arrays, because I would like to avoid for loops.
Best Answer