[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 16:05:14 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20070914) |
Martijn van Oosterhout wrote:
> On Jan 25, 2008 12:28 PM, David Bateman <address@hidden> wrote:
>
>> 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.
>>
>
> That commit added the resize, which is the cause of my problems. It
> only goes wrong for complex matrices. You're saying that something
> else changed in octave so that the above works? Because on my machine
> I get this:
>
> octave:1> S=speye(1000); issparse(S)
> ans = 1
> octave:2> issparse( resize( resize(S,0),1000, 1000 ))
> ans = 1
> octave:3> S=speye(1000)*I; issparse(S)
> ans = 1
> octave:4> issparse( resize( resize(S,0),1000, 1000 ))
> ans = 0
>
> Anyway, I found another way of solving the problem. If I get around to
> upgrading I'll try it out there... Thanks anyway.
>
> Have a nice day,
>
This works correctly in Octave 3.0
D.
--
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