function f=void_fill1d(v,x);
%VOID_FILL1D - ????
%
%   Usage:
%      f=void_fill1d(v,x);

f=v;
pos1=find(isnan(f));
pos2=find(~isnan(f));
for n=1:length(pos1),
   distance=sqrt((x(pos1(n))-x(pos2)).^2);
[junk,i]=min(distance);
f(pos1(n))=f(pos2(i));
end
