void_fill

PURPOSE ^

VOID_FILL - ???

SYNOPSIS ^

function f=void_fill(v,x,y);

DESCRIPTION ^

VOID_FILL - ???

   Usage:
      f=void_fill(v,x,y);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function f=void_fill(v,x,y);
0002 %VOID_FILL - ???
0003 %
0004 %   Usage:
0005 %      f=void_fill(v,x,y);
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+(y(pos1(n))-y(pos2)).^2);
0012 [junk,i]=min(distance);
0013 f(pos1(n))=f(pos2(i));
0014 end
0015

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003