You might just be out of memory. You appear to be using a 32 bit version of MATLAB, are so are being limited by the fact that MS Windows can give 32 bit processes at most 3.0 Gigabytes of memory, and even then can only give that much memory if a special boot-time flag was given.
If you were able to switch to a 64 bit version of memory on a 64 bit operating system on the same computer, then you would be able to configure your system to add swap space that your MATLAB program could use. This would, however, probably be rather slow.
Better would be to get a computer with more memory and 64 bit Windows and a 64 bit version of MATLAB.
It is possible that your system does have enough memory to store the matrix (but would probably fail to try to use the matrix.) The line
being the problem hints to me that the software is not pre-allocating all of the memory to store the data. When you do not pre-allocate an output matrix, then each time you go to grow the output matrix, it needs to take a copy of the data, which temporarily duplicates the data in memory, possibly filing up memory. If the code had done something like
SR = zeros(83, 640, 480);
ahead of time then that problem would not occur.
Best Answer