MATLAB: Matrix multiplication with very large tables

I need to perform a matrix multiplication with very large matrices, something like 5000x13 * 13x2000000 . This leads to an error message as I don't have enough memory. I understand this. Now, what's the best strategy to overcome this memory issue?

My suggestion is to split the array that you want to generate. Even if you generate the array, you can not store it! 5000 by 2 million is larger than array size limit in MATLAB! This limit applies to the size of each array, not the total size of all MATLAB arrays. So the problem is not coming from multiplication. My suggestion is that you make four blocks of your output matrix each 5000 by 500K and write the multiplication of each block separately.