I am trying to analyse a Principal component analysis of a data set. But when I trying to take columns more than 5 as principal components, matlab throws an error saying 'out of memory'. How to counteract this problem?
It should not say 'out of memory' with those dimensions. Maybe you have a typo on your code and the algorithm is not doing what it is supposed to do. Can you post here the lines where the error appears?
Have you run a lot of operations in the same MATLAB window and/or left MATLAB open for long periods of time (such as overnight) before attempting the analysis? If so, you should probably close and reopen MATLAB, perform the minimum number of operations required to get you setup for another attempt, and then make the attempt. Keeping MATLAB open for extended periods of time (overnight or longer) is not recommended, as this can lead to a memory problem at an inconvenient time.
If you still get an out of memory error from a fresh MATLAB, then there is a more serious problem. It could be inefficient or broken code as was pointed out by Pablo Aguilera, or it could be a problem with the dataset itself.
I am using this dataset for ANFIS application and the "out of memory" error comes during the execution of anfis. Now does this help in any way to find the solution. I am using a 32-bit version of MATLAB.