function y = ovrlpsav(x, h, L)
h = h(:);
x = x(:); % make sure x and h are column vectors
P = length(h);
N = length(x);
D = L-P+1;
x = [zeros(P-1,1);x]; % zero pad front end of x for first window
H = fft(h,L); % Zero pad h to L points, and fft.
y = [];
for r = 0:fix(N/D)-1
xr = x(r*D+1:r*D+L); % extract overlapping r_th window from x
Xr = fft(xr);
Yrp = Xr .* H; % Multiply in frequency domain
yrp = ifft(Yrp);
y = [y; yrp(P:L)]; % Concatinate good points from each window
end