Code covered by the BSD License  

Highlights from
Interactive Resolution Enhancement

image thumbnail
from Interactive Resolution Enhancement by Tom O'Haver
Mathematically simple, quickly-computable resolution enhancement for time-series signals consisting

s=tsmooth(Y,w) % tsmooth(Y,w) smooths vector Y by a triangular function of halfwidth w % T. C. O'Haver, 1988. v=conv(boxcar(w),boxcar(w)); S=conv(Y,v); startpoint=(length(v) + 1)/2; endpoint=length(Y)+startpoint-1; s=S(startpoint:endpoint) ./ sum(v);
function s=tsmooth(Y,w)
%  tsmooth(Y,w) smooths vector Y by a triangular function of halfwidth w
%  T. C. O'Haver, 1988.
v=conv(boxcar(w),boxcar(w));
S=conv(Y,v);
startpoint=(length(v) + 1)/2;
endpoint=length(Y)+startpoint-1;
s=S(startpoint:endpoint) ./ sum(v);

Contact us at files@mathworks.com