Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Roots in negative/positive plane
Replies: 3   Last Post: Dec 18, 2013 2:22 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alex

Posts: 14
Registered: 12/18/13
Re: Roots in negative/positive plane
Posted: Dec 18, 2013 2:10 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Nasser M. Abbasi" wrote in message <l8sr49$gog$2@speranza.aioe.org>...
> On 12/18/2013 12:44 PM, Alex wrote:
> > I have a polynomial and i want to know how many roots are in negative or positive
> >
> > p=[1 5 8 1 5];
> > roots(p)
> > ans =
> >
> > -2.6171 + 1.3412i
> > -2.6171 - 1.3412i
> > 0.1171 + 0.7513i
> > 0.1171 - 0.7513i
> >
> > zplane(p)
> >
> > The plot show that i have 2 roots in negative plane and 2 roots
> >in positive plane. Thank you!
> >

>
> may be you can use real and imag?
>
> p=[1 5 8 1 5];
> r=roots(p)
> length(find(real(r)>0))
> 2
>
> etc...
>

In the example i wrote, yes the roots are in the complex plane. I have an input any polynomial and want to know how many roots are in the negative or positive plane. I understand and thank you!



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.