MATLAB: How to generate a polynomial from roots that are repeated

doubleMATLABpolypolynomialrepeatedrootroots

So I've got the roots of a polynomial from which I want to design the polynomial.
The thing is that I've got 8 roots, 4 of which are repeated. These are the roots I have:
-0.7437 – 1.4178i
-0.7437 – 1.4178i
-1.1031 + 0.1267i
-1.1031 + 0.1267i
-0.4571 + 0.9526i
-0.4571 + 0.9526i
-0.0977 + 1.0976i
-0.0977 + 1.0976i
When I do the polynomial by using the function poly, I get the polynomial that corresponds to the 8 roots but I'd like the polynomial for only the 4, non-repeated roots.
How could I do this? (I know I could probably eliminate the repeated, but I'd like a function that considers repeated roots or something).
Thanks in advance

Best Answer

Iinteresting. I would expect no repeats, and complex conjugate values instead.
Try this:
rts = [ -0.7437 - 1.4178i
-0.7437 - 1.4178i
-1.1031 + 0.1267i
-1.1031 + 0.1267i
-0.4571 + 0.9526i
-0.4571 + 0.9526i
-0.0977 + 1.0976i
-0.0977 + 1.0976i];
Urts = unique(rts);
p1 = poly(Urts);
Ucrts = [Urts; conj(Urts)];
p2 = poly(Ucrts);
.