フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how can i fix these errors

1 回表示 (過去 30 日間)
Abdulrahman Al Ali
Abdulrahman Al Ali 2019 年 3 月 7 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
k.JPG
kk.JPG
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
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!

Translated by