[Top][All Lists]

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

tril/triu not preserving sparseness

From: Martijn van Oosterhout
Subject: tril/triu not preserving sparseness
Date: Fri, 25 Jan 2008 11:59:24 +0100


I'm working with matrices 6380x6380 and building them sparse. However,
if I do tril/triu on them it tries to build a full matrix and
immediately runs out of memory..
I'm on Octave 2.9.9 and the code for these functions contains the line:

    retval = resize (resize (x, 0), nr, nc);

This returns a full matrix even if x is sparse. If I comment that line
out it runs fine, but the final matrix is not of the right dimensions
(depending on the value of k). So at the end of the function I put the

  retval = resize (retval, nr, nc);

And now octave segfaults. I just need a version of tril/triu that
works with sparse matrices, anyone have any tips?

Have a nice day,

Martijn van Oosterhout <address@hidden>

reply via email to

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