help-octave
[Top][All Lists]
Advanced

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

Re: problem with consistency of root finding and sorting


From: David Bateman
Subject: Re: problem with consistency of root finding and sorting
Date: Wed, 10 Oct 2007 09:45:19 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Ben Abbott wrote:
>
> Thanks David,
>
> another attempt, if you don't mind
>
> p = roots([1 0 18 0 81])
> p =
>
>   -0.0000 + 3.0000i
>   -0.0000 - 3.0000i
>    0.0000 + 3.0000i
>    0.0000 - 3.0000i
>
octave:1> p = roots([1 0 18 0 81])
p =

   0.0000 + 3.0000i
   0.0000 - 3.0000i
  -0.0000 + 3.0000i
  -0.0000 - 3.0000i

> [e, indx] = mpoles (p)
> e =
>
>    1
>    2
>    1
>    2
>
> indx =
>
>    1
>    3
>    2
>    4

octave:2> [e, indx] = mpoles (p)
e =

   1
   2
   1
   2

indx =

   2
   4
   1
   3

>
> p(indx)
> ans =
>
>   -0.0000 + 3.0000i
>    0.0000 + 3.0000i
>   -0.0000 - 3.0000i
>    0.0000 - 3.0000i
>
>
>
octave:3> p(indx)
ans =

   0.0000 - 3.0000i
  -0.0000 - 3.0000i
   0.0000 + 3.0000i
  -0.0000 + 3.0000i


-- 
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]