Requested 196608x4096 (12.0GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to unresponsive
I was trying to multiply them through a loop ( As I have other operations to execute)
Inside the loop , when these two matrices are multiplied at that moment I am getting the error :
"Requested 196608x4096 (12.0GB) array exceeds maximum array size preference. Creation of arrays greater
than this limit may take a long time and cause MATLAB to become unresponsive."
I tried with "tall" but sparse matrix cannot be converted into tall . I there any way to tackle this problem as I do not have large amount of memory in my laptop.
I can recognise that you are trying to multiply 2 matrices of size (196608,4096) and (16, 16, 16) respectively. Due to maximum array size limitations, you are unable to load the (196608, 4096) sized matrix into your MATLAB environment.
You can remove the maximum array size limit by unchecking the checkbox in MATLAB >Preferences > Workspace > MATLAB array size limit.
1. Click on Preferences (present in the Home tab)
2. Go to the workspace.
3. Uncheck the maximum array size limit checkbox.
I can see that you have also tried using the tall arrays but were unable to convert your sparse array into them directly, I have a workaround for that,
Still, you might not be able to load those arrays into your workspace due to low memory in your device, in that case the only option you have might be to upgrade the memory size.
Also, you can refer to a similar question on MATLAB Answer using the following link,
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.