[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memory

From: Moo
Subject: Re: memory
Date: Tue, 5 Apr 2011 05:38:57 -0600

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)

memory error is shown at 1

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]