[Top][All Lists]

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

Re: generating sparse matricies

From: avraham
Subject: Re: generating sparse matricies
Date: Sat, 1 Oct 2005 14:11:57 +0200
User-agent: Mutt/

On Fri, Sep 30, 2005 at 11:07:31PM -0700, Paul Roberts wrote:
> Hello,
> I am using Octave 2.1.64. I would like to iteratively build a sparse matrix
> uring code like:
> X = sparse(10000,1000);
> for j=1:1000
> X(:, j) = rand(10000,1) < 0.01;
> end
> I have found however that when I try X(:,j) = rand(10000,1) < 0.01;, the
> matrix X is converted to a full matrix. This happens even if I write: X(:,j)
> = sparse(rand(10000,1) < 0.01);
> My questions are: (1) Will this be changed in future versions of Octave and
> (2) is there an efficient work around for this issue? I have tried using
> sphcat, but that seems to be very slow.
> Thanks!
> Paul
I still have 2.1.64. Asking:
help sprand
I get:
sprand is the user-defined function from the file

Which means that you need octave-forge as well.

Good luck, Avraham

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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