採用された回答

madhan ravi
madhan ravi 2018 年 11 月 23 日
編集済み: madhan ravi 2018 年 11 月 23 日

0 投票

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

8 件のコメント

Gaston Gakomo
Gaston Gakomo 2018 年 11 月 23 日
Hi, im getting error when i write the function.
what is the correct way for matlab to understand it ?
madhan ravi
madhan ravi 2018 年 11 月 23 日
編集済み: madhan ravi 2018 年 11 月 23 日
Read the link in the answer I posted and upload the code that you are trying
Gaston Gakomo
Gaston Gakomo 2018 年 11 月 23 日
like this ?
>> syms f(x)
>> f(x)= x^3-x^2+2*x-4;
>> fplot(f)
madhan ravi
madhan ravi 2018 年 11 月 23 日
perfect!
Gaston Gakomo
Gaston Gakomo 2018 年 11 月 23 日
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 2018 年 11 月 23 日
編集済み: madhan ravi 2018 年 11 月 23 日
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 2018 年 11 月 23 日
thank you very much.
madhan ravi
madhan ravi 2018 年 11 月 23 日
Anytime :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

製品

リリース

R2018a

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by