MATLAB: Finding the maximum positive real number in a array of complex numbers


Hello i am trying to find the max positive real roots of polynomial. I can use P=roots(p) to find the roots but when i use Real(max(P)), I sometimes get highest negative real number how do i find the maximum positive real number?

Best Answer

  • out = max(real(P))
    may be so
    out = max(p(image(p) == 0))