


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

0001 function f=void_fill1d(v,x); 0002 %VOID_FILL1D - ???? 0003 % 0004 % Usage: 0005 % f=void_fill1d(v,x); 0006 0007 f=v; 0008 pos1=find(isnan(f)); 0009 pos2=find(~isnan(f)); 0010 for n=1:length(pos1), 0011 distance=sqrt((x(pos1(n))-x(pos2)).^2); 0012 [junk,i]=min(distance); 0013 f(pos1(n))=f(pos2(i)); 0014 end