Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Matlab Code For Lagrange Fractional Delay

function h = lagrange(N, delay)
%LAGRANGE  h=lagrange(N,delay) returns order N FIR 
%          filter h which implements given delay 
%          (in samples).  For best results, 
%          delay should be near N/2 +/- 1.
n = 0:N;
h = ones(1,N+1);
for k = 0:N
    index = find(n ~= k);
    h(index) = h(index) *  (delay-k)./ (n(index)-k);
end


Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download Interpolation.pdf
Download Interpolation_2up.pdf
Download Interpolation_4up.pdf
Visit the online book containing this material.

``Bandlimited Interpolation, Fractional Delay Filtering, and Optimal FIR Filter Design'', by Julius O. Smith III, (From Lecture Overheads, Music 420).
Copyright © 2015-03-30 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]