help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Taylor expansion using the fft


From: Fernando
Subject: Re: Taylor expansion using the fft
Date: Sat, 8 Oct 2011 06:41:12 -0700 (PDT)

Forgot to mention you can do numerical differentiation also using the same
code as above by adding:

deriv =coeff.*factorial(n));

which gives you up to the (N-1)th derivative evaluated at x=0.

Example:
taylor(16,0.5,@(x) exp(4*x))
deriv =coeff.*factorial(n))

ans =

 Columns 1 through 6:

   1.0000e+00   4.0000e+00   1.6000e+01   6.4000e+01   2.5600e+02  
1.0240e+03

 Columns 7 through 12:

   4.0960e+03   1.6384e+04   6.5536e+04   2.6214e+05   1.0486e+06  
4.1943e+06

 Columns 13 through 16:

   1.6777e+07   6.7109e+07   2.6844e+08   1.0737e+09

The first value in the outcome gives you the value of function at zero, and
then the first deriv, 2nd etc...

--
View this message in context: 
http://octave.1599824.n4.nabble.com/Taylor-expansion-using-the-fft-tp3885008p3885077.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]