The & is misused. Try:
function [xp,xm] = find_roots(a,b,c)
if b^2-4*a*c<0
xp=888;
xm=888;
else
xp=(-b/(2*a))+sqrt(b^2-4*a*c)/(2*a);
xm=(-b/(2*a))-sqrt(b^2-4*a*c)/(2*a);
end
Also have a look at the built-in roots
doc roots
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!