I am using Matlab 2009b and having an out of memory error. I read other posted sol but they are not useful for me. I am sure that i am doing things right but i must use very huge amount of array sizes. I think that the problem lies beyond the fact that Matlab does not enable an array to be in more than one OS block. I am using Windows 7. Is there a way to get rid of this problem? For example, can I increase the array block that Matlab uses in Windows 7?
System: Windows 7
Matlab: 2009b
If you think your array sizes are not big enough to warrant such an error, maybe your previous operations fragmented available memory. MATLAB requires contiguous blocks so fragmentation can lead to such errors.
So before the point in your code where an out of memory error occurs, try running the pack
command. That's all I can think of apart from the usual fixes.
If the largest available block (as shown by memory
) is much smaller than the maximum amount of memory available to Matlab, a restart of Matlab (or the system) can help.
Otherwise, you need to either rewrite your code or buy more RAM (and/or use the 64-bit version of Win7).
I suggest you try rewriting your code. It is very often possible to work around memory issues.
EDIT
From your comment on @Richie Cotton's post, I see that you want to do classification an a huge amount of data. If the are a small number of classes, none of which are very sparse, you can solve the problem by running kmeans on, say, 10 randomly chosen subsets of, say, 30% of your data each. This should find you the centers of the clusters just fine. To associate your data with the kernels, all you have to do is calculate, for each data point, the distance to the cluster centers and associate them with the closest center.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With