[Chageset]: Add the spaugment function

David Bateman David.Bateman at motorola.com
Thu Apr 3 02:49:28 CDT 2008


John W. Eaton wrote:
> On  2-Apr-2008, Ben Abbott wrote:
>
> | 
> | On Apr 2, 2008, at 1:12 PM, David Bateman wrote:
> | > Another easy function to implement. The help string and the example  
> | > took
> | > longer to write :-)
> | >
> | > D.
> | 
> | David, I'm getting a failure with this one.
> | 
> | Is there reason for concern?
> | 
> | In event it is important, I built with SuiteSparse 3.1.0.
> | 
> | octave:5> test spaugment
> |    ***** test
> |   m = 11; n = 10; mn = max(m ,n);
> |   a = spdiags ([ones(mn,1), 10*ones(mn,1), -ones(mn,1)],[-1,0,1], m, n);
> |   x0 = a \ ones (m,1);
> |   s = spaugment (a);
> |   [L, U, P, Q] = lu (s);
> |   x1 = Q * (U \ (L \ (P  * [ones(m,1); zeros(n,1)])));
> |   x1 = x1(end - n + 1 : end);
> |   assert (x1, x0, 1e-10)
> | !!!!! test failed
> | error: assert (x1,x0,1e-10) expected
> |     0.109902
> |     0.099020
> |     0.100097
> |     0.099990
> |     0.100001
> |     0.100000
> |     0.099990
> |     0.099990
> |     0.099020
> |     0.099020
> | but got
> |     0.109902
> |     0.099020
> |     0.100097
> |     0.099990
> |     0.100001
> |     0.100000
> |     0.099990
> |     0.099990
> |     0.099020
> |     0.099020
> | maximum absolute error 1.655e-07 exceeds tolerance 1e-10
>
> This looks like a case where we just need to change the tolerance.
>
> jwe
>
>   
I agree. The tolerance of 1e-10 worked fine for me.. Make it 1e-6 and it
should be fine

D.


-- 
David Bateman                                David.Bateman at motorola.com
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



More information about the Octave-maintainers mailing list