octave-maintainers
[Top][All Lists]
Advanced

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

Re: Octave and Freemat


From: David Bateman
Subject: Re: Octave and Freemat
Date: Wed, 05 Mar 2008 10:11:55 +0100
User-agent: Thunderbird 2.0.0.9 (X11/20080213)

Ben Abbott wrote:
>
> On Mar 4, 2008, at 6:46 PM, Sebastien Loisel wrote:
>
>> Dear David,
>>
>> Thank you for your email.
>>
>> On Tue, Mar 4, 2008 at 5:44 PM, David Bateman
>> <address@hidden> wrote:
>> f = find (p ./ max(p));
>> p = p (f(1):end);
>>
>> Are you missing an abs maybe? Also, I hope you did your checking for
>> nans and infs before you got there.
>>
>> -- 
>> Sébastien Loisel
>
>
> To respect Matlab an error should result when NaNs or Infs are present.
>
> The abs shouldn't be necessary. In fact, if NaNs and Infs have already
> be handled, why not
>
> f = find (p);
> p = p(f(1):end);
> n = numel (p)-1;
> A = diag (ones (n-1, 1), -1);
> A(1,:) = -p(2:n+1) ./ p(1);
> z = eig (A);
>
> Ben
This is essentially what is already present, but it doesn't handle
[1e-200 1e200 1] case that Sebastien pointed out, as the leading 1e-200
is essentially zero after taking into account the scaling factor or
1e200. Yes I believe the abs is necessary.

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



reply via email to

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