s =
Why do you assume that there is one and only one positive real root? A polynomial with purely real coefficients can still have only purely imaginary roots.
syms x
s = expand((x-1i)*(x+1i)*(x-2i)*(x+2i))
By inspection the roots of s are . Each of those four values makes one of the terms inside the expand call equal to 0. Let's check numerically.
p = sym2poly(s)
r = roots(p)
The roots function confirms the result we received by inspection. [Okay, to be fair there's some very small (on the order of eps) non-zero real part of some of the elements of r. That's noise.]
So what would you expect to be stored if the polynomial whose roots you're computing turned out to be something like p in the code above? None of the elements in r satisfy even the first of the conditions you're using.
r(r == real(r))