function parabola2( a, b, c) %PARABOLA Summary of this function goes here % Detailed explanation goes here rts = sort(roots([a b c])); if isreal(rts) x1 = rts(1); x2 = rts(2); d = (x2 - x1)/2; else x1 = -b / (2*a); x2 = x1; d = abs(c); end if x1 == x2 d = max([abs(d) 2*d 10]); end x = x1-d:.1:x2+d; y = a*x.^2 + b*x + c; plot(x, y); end