MATLAB: How to input a 294192×294192 array

input large array

I want to get a 294192×294192 zero array:M=zeros(294192,294192) However I got error as follows: Requested 294192×294192 (644.8GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. How to deal with it?Any good way to get this array?Thank you.

Best Answer

Why do you want an array that big? Clearly its size is way bigger than is sensible so even if you could create it what would you do with it?
You probably need to rethink your problem if that is what you need.
If you want most of the array to remain zeros you can use
doc sparse
though if that works for what you want.