Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
how can i fix these errors
조회 수: 3 (최근 30일)
이전 댓글 표시
![k.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/207425/k.jpeg)
![kk.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/207426/kk.jpeg)
syms x
%expression for f(x)
f=exp(-x)*sin(x)*cos(x);
%taylor series expansion for upto to 8th order
t_8=taylor(f,'Order',9,'ExpansionPoint',0);
%Plotting f(x) and t_8(x)
fplot({f,t_8},[-2 2],'Linewidth',2)
grid on
hold on
%Plotting (0,0) point
plot(0,0,'b.','MarkerSize',16);
hold off
%Formatting legends, xlabel and title
legend({'$f(x)$','$t_{8}(x)$'},'Interpreter','latex','Location','north','FontSize',18)
xlabel('$x$','Interpreter','latex','FontSize',20)
title('Taylor expansion of $e^{-x}\sin(x)\cos(x)$ at $x=0$','Interpreter','latex','FontSize',16)
댓글 수: 1
Walter Roberson
2019년 3월 7일
Symbolic functions look like (for example)
f(x) = sin(x+pi/3);
where you wrote the equivalent of
f = sin(x+pi/3);
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!