fft_evaluate - deg=floor(n/2); t=zeros(size(x)); t= t+...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function t=fft_evaluate(b,x) % this evaluates the Fourier interpolating polynomial at x % on the interval [0, 2*pi] % input % b the Fourier coefficients, from fft % x array of x values, in the interval [0,2*pi] n=length(b);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: deg=floor(n/2); t=zeros(size(x)); t= t+ b(deg+1)*0.5; c=exp(i*x); % t is a polynomial in c of degree deg --- use Horner's rule to evaluate for k=deg:-1:2 t=t.*c+b(k); end t=(b(1) + t.*c*2)/n;...
View Full Document

This note was uploaded on 09/19/2009 for the course MATH numerical taught by Professor Ford during the Spring '09 term at FAU.

Ask a homework question - tutors are online