Réponse acceptée

madhan ravi
madhan ravi le 23 Nov 2018
Modifié(e) : madhan ravi le 23 Nov 2018

0 votes

see fplot()(link)
Use syms x and use fplot() to plot the function

8 commentaires

Gaston Gakomo
Gaston Gakomo le 23 Nov 2018
Hi, im getting error when i write the function.
what is the correct way for matlab to understand it ?
madhan ravi
madhan ravi le 23 Nov 2018
Modifié(e) : madhan ravi le 23 Nov 2018
Read the link in the answer I posted and upload the code that you are trying
like this ?
>> syms f(x)
>> f(x)= x^3-x^2+2*x-4;
>> fplot(f)
madhan ravi
madhan ravi le 23 Nov 2018
perfect!
Gaston Gakomo
Gaston Gakomo le 23 Nov 2018
Using the graph, i need to find the solutions for the equation in three decimal places.
but im only getting one line?
madhan ravi
madhan ravi le 23 Nov 2018
Modifié(e) : madhan ravi le 23 Nov 2018
syms f(x) y
f(x)= x^3-x^2+2*x-4;
fplot(f)
hold on
fplot(subs(y,0))
sol=vpasolve(f) %you can see two imaginary roots
solutions = roots(sym2poly(f))
Gaston Gakomo
Gaston Gakomo le 23 Nov 2018
thank you very much.
madhan ravi
madhan ravi le 23 Nov 2018
Anytime :)

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Version

R2018a

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by