Plot exactly root of polynomial degree=3

Hello, How can I plot exactly intersection point between rootof polynomial degree = 3 with (d): u = 10
tSol = solve(t^3 - t^2 == 10, t)
scatter(real(tSol),imag(tSol),'filled','red')
or
tSol = solve(t^3 - t^2 == 10, t)
digits(100);
plot(vpa(tSol(1)), 10, 'r*')
Thanks for reading!!!

Answers (1)

p = [1 -1 0 -10] ; % polynomial coefficients
r = roots(p) ; % get roots
%% plot
x = linspace(0,10);
y = polyval(p,x) ;
hold on
plot(x,y)
plot(r(1),0,'*r') % first root is real thats why r(1)

Categories

Asked:

on 25 Nov 2020

Answered:

on 25 Nov 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!