I lost two days of trying to do this but with no result. How can I plot the quadratic equation's parabola and roots. Something like this. I just need to be able to see the parabola and that it crosses the abscissa at the write coordinates.
Here is what I have:
x = linspace(-50,50);
y = 1.*x.*x - 8.*x + 15;
plot(x,y)
hold on;
grid()
rts = roots([1,-8,15]);
plot(rts, zeros(size(rts)), 'o', "color", "r")
And the result is:
As you can see, the top of the parabola at 0 ordinate, instead of under it. I will appreciate your help!