I have a situation that looks like this:
Where A is of size=1440x181x2251 and B size=2221x8.
What I want to do is simply perform an element wise multiplication between A(:,:,31:end) and all the rows of the i’th column in B and then store the summation of the third dimension of this in C depending on the address of i. This seemingly simple command is destroying the runtime of my script and I can’t really figure out how to speed it up by avoiding the for loop. I tried replacing the for loop by a parfor to do several loops at the same time but I immediately run out of memory when I try that so it doesn’t work.