On Tue, Apr 5, 2011 at 5:13 AM, nuncio m
<address@hidden> wrote:
Hi martin,
Here is the code snippet
R=f' * f ---------------------------------(1)
[C,L]=eigs(R);-----------------------(2)
[C1,Lambda,CC]=svd(f);-------------(3)
memory error is shown at 1
thanks
nuncio
I assume you mean f is size of 348 rows and 29898 columns. In that case, the result R = f' * f would be 29898 x 29898, rather than 348 x 348 (which I expect is what you want). If I did the calculation right, the square matrix of dimension 29898 would take roughly 6.6GB in memory, which explains your memory problem.
The solution is: either take the transpose of f before those lines; f = f'; or change (1) to R = f * f', which computes the normal matrix size 348 x 348 you want.
Hope that helps.