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

maximumroots

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?

• out = max(real(P))
out = max(p(image(p) == 0))