Home > p2plib > p2interpol.m

p2interpol

PURPOSE ^

interpolate u def. on x,y to new mesh given in xn,yn

SYNOPSIS ^

function un=p2interpol(xn,yn,u,x,y)

DESCRIPTION ^

 interpolate u def. on x,y to new mesh given in xn,yn 
 matlab interface, see octcomp/p2interpol for octave version

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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);

Generated on Wed 15-Aug-2012 10:09:15 by m2html © 2005