Code covered by the BSD License  

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Fourier derivative

Be the first to rate this file! 5 Downloads (last 30 days) File Size: 1.32 KB File ID: #39700 Version: 1.0
image thumbnail

Fourier derivative


Matt (view profile)


A numerical differentiator for periodic functions using Fourier transformations

| Watch this File

File Information

Spectral methods of solving partial differential equations may involve the use of a Fourier transform to compute derivatives. If f is a uniformly sampled periodic function containing an even number of elements, then fourierderivative(f) computes the derivative of f with respect to the element spacing. For best results, f should be periodic such that f(x + a) = f(x + b). As an example,

 x = linspace(0,pi);
 f = exp(cos(x).*sin(2*x));
 dfdx = fourierderivative(f,0,pi);

Results for nonperiodic f are dubious.

Required Products MATLAB
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us