PS =
Others have told you how to get what you wanted but they didn't say why what you tried didn't work. Let's look at the polynomial whose roots you tried to compute.
x=0.1:0.1:0.5;
p = [-2 1 x -8]
The roots function is not vectorized to operate on multiple polynomials at once, and even if it did the code you wrote wouldn't create that array of polynomials. Instead of creating 5 polynomials:
O = ones(size(x.'));
p5 = [-2*O, 1*O, x.', -8*O]
what you wrote creates a different polynomial. The solutions you received were right but for a different polynomial than you were interested in.
PS = poly2sym(p)
format longg
roots(p)
vpasolve(PS)
[The output of roots and vpasolve are in different orders, but they contain basically the same elements.]