I have implemented the Karhunen-Loève expansion as per this question.
I have tested it with samples of data obtaining possitive results.
However, now I am dealing with a matrix of dimensions 211302*50, meaning that I have roughly 200000 observations of 50 random variables.
If I try to calculate the covariance matrix of these using the observations as columns (as per the previus link), the program crashes and the error returned is:
Error using *
Requested 211302x211302 (332.7GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take
a long time and cause MATLAB to become unresponsive.
Error in cov (line 155)
c = (xc' * xc) ./ denom;
Is there a way to do what I want or is the matrix just too big?