Error using taylor to find Maclaurin polynomials

2 views (last 30 days)
Hi I have some problem with using the taylor function, this is what I did
syms x f=exp(x^2); taylor(f,5,0)
I'm want to find the fourth degree of Maclaurin polynomials with a=0
but I received this error
****************************************************
Error using sym/taylor (line 104)
Argument 'x' failed validation
@(x)isa(x,'sym')||(ischar(x)&&~any(strcmpi(x,{'Order','ExpansionPoint','OrderMode','Absolute','Relative'}))).
Error in question3 (line 5)
taylor(f,5,0)
****************************************************
The line 104 does not exist in my matlab equation

Accepted Answer

Mischa Kim
Mischa Kim on 23 May 2014
Samious, how about
syms x
f = exp(x^2);
ts = taylor(f, x, 0, 'Order', 5)

More Answers (0)

Categories

Find more on Polynomials in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!