interpolate u def. on x,y to new mesh given in xn,yn matlab interface, see octcomp/p2interpol for octave version
0001 function un=p2interpol(xn,yn,u,x,y) 0002 % interpolate u def. on x,y to new mesh given in xn,yn 0003 % matlab interface, see octcomp/p2interpol for octave version 0004 xv=reshape(x, size(x,1)*size(x,2), 1); 0005 yv=reshape(y, size(y,1)*size(y,2), 1); 0006 zv=reshape(u, size(u,1)*size(u,2), 1); 0007 F=TriScatteredInterp(xv,yv,zv); 0008 un=F(xn,yn);