MATLAB: How to create arrays of very large size in a Matlab

large arraymemory error

For my code I need to create random numbers for each iteration and I need to go in the order of 10^12 steps. Hence so many random number rows I need to generate because calling the rand function every time can cost me computational time. I also need to create adjacency matrix of size 70000X70000. In such cases I get memory error. I am using a 64 bit machine with 8GB RAM. So is there any way to compress arrays or using the hard disk space to create and store arrays in real time?

Best Answer

Although a better advice is not to allocate such high memory I advance and look for a way to create this matrix one by one at runtime. But if it is absolutely necessary, refer to the documentation of tall arrays.
Related Question