Code covered by the BSD License  

Highlights from
Toolbox signal

image thumbnail
from Toolbox signal by Gabriel Peyre
Signal processing related functions.

perform_shannon_interpolation(x,eta)
function y = perform_shannon_interpolation(x,eta)

% perform_shannon_interpolation - spectral interpolation
%
%   y = fft_interp(f,factor);
%
%   Copyright (c) 2003 Gabriel Peyr

N = length(x); N0 = (N-1)/2; P =N*eta;
f = fft(x);
f = eta*[f(1:N0+1); zeros(P-N,1); f(N0+2:N)];
y = real( ifft(f) );

Contact us at files@mathworks.com