function y = smpthm(t,x,tau,W)
%
% Use the sampling theorem to reconstruct
% a bandlimited waveform.
%
% t = ROW vector of reconstruction times
% x = ROW vector of waveform samples
% tau = ROW vector of sampling times
% W = bandwidth of waveform

twoW = 2*W;
sp = tau(2)-tau(1);    % sampling period
y = twoW*sp*lincmb(t,x,'sinc',tau,twoW);