[Top][All Lists]

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

Re: tril/triu not preserving sparseness

From: David Bateman
Subject: Re: tril/triu not preserving sparseness
Date: Fri, 25 Jan 2008 12:28:14 +0100
User-agent: Thunderbird (X11/20070914)

Martijn van Oosterhout wrote:
> Hi,
> 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
> line:
>   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,
Fixed in a later version of Octave... The relevant changelog entry is

2006-04-02  David Bateman  <address@hidden>

        * general/tril.m, general.triu.m:
        Use resize (resize (x, 0), nr, nc) rather than zeros (nr, nc)
        to allow user types to work correctly.
        * special-matrix/hankel.m, special-matrix/toeplitz.m: Ditto.

and as you can see the issue was addressed 21 months ago, so please
upgrade your version of Octave.


David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary

reply via email to

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