help-octave
[Top][All Lists]
Advanced

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

Re: elements of a sparse matrix


From: Jordi Gutiérrez Hermoso
Subject: Re: elements of a sparse matrix
Date: Mon, 27 Dec 2010 10:45:38 -0600

2010/12/27 Jaana Tommiska <address@hidden>:
> Jordi Gutiérrez Hermoso kirjoitti 27.12.2010 kello 18:10:
>>
>> What's the density of your matrix? What was the exact call to sprand?
>> I'm noticing that the density matters a lot.
>
>
>>
>> Yes, but I'm curious why wouldn't it work otherwise. Can you provide a
>> reproducible test case?
>>
> I wrote these lines
> B=sprand(20000,10000,0.01);
> A=B'*B;
> A(10000,10000)
> or
> A(10000*10000)
>
> I am interested if the matrix A is too big to fit in the memory?

Well, the problem is that A isn't really sparse, even though B is. A
seems to be 86% full on average here. So yes, A is probably too big to
fit in memory. Its size here is close to one gigabyte (check with
"whos A"). It's interesting that you only get this problem when
actually trying to access an element of A by using two indices instead
of one.

- Jordi G. H.


reply via email to

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