for example, I = A*B, in which size(A) = [1024^2, 3], size(B) = [3, 1001^2]. So, size(I) = [1024^2, 1001^2] which could cause out of memory.
I have tried using tall arrays like the following code:
AA = tall(A);
II = AA*B;
I = gather(II);
but the command line still shows error: out of memory.
%% update %%
Thanks for your answer very much! Originally, I want to calculate this equation:
so I write the following matrix equation:
m and n are variable, for example,m = 1024, n=1001^2 whatever. It is worth noting that the two matrices in exp(...) are not too big, but the result of their multiplication is too large to be storaged in memory. I've tried to split the two matrices into several small patches, but it need to input the number of the patches manually rather than automatically, moreover, the for loop could not be avoided in this case.
I have no good ideal currently.