채택된 답변

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
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

태그

질문:

2018년 11월 23일

댓글:

2018년 11월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by