"Nasser M. Abbasi" wrote in message <firstname.lastname@example.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!