I want to find several taylor polynomials with n = 1:10
I have the following code:
syms x;
syms n positive integer;
f(x) = atan(x);
P(x,n) = taylor(f, x, 'Order', n);
But there is a Error:
Error using sym/taylor (line 99)
The value of 'Order' is invalid. It must satisfy the function: isPositiveInteger.

 채택된 답변

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019년 10월 11일
편집: Sulaymon Eshkabilov 2019년 10월 11일

0 개 추천

Hi,
Here is the complete answer to your exercise:
syms x
f(x) = atan(x);
syms ii positive integer;
for ii=1:10
P(ii) = taylor(f, x, 'Order', ii);
end
Good luck.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by