Scilab Function
Last update : 3/10/2006

cgal_interp2 - a bilinear interplation.

Calling Sequence

vp = cgal_interp2(xp,yp,x,y,v)

Parameters

Description

The function cgal_interp2 is a bilinear interpolation, it computes the weighted sum of the function values.

Examples


n = 8;
x = linspace(0,2*%pi,n); y = x;
z = 2*sin(x')*cos(y);
xx = linspace(0,2*%pi, 40);
[xp,yp] = ndgrid(xx,xx);
zp = cgal_interp2(xp,yp, x, y, z);
xbasc()
plot3d(xx, xx, zp, flag=[2 6 4])
[xg,yg] = ndgrid(x,x);
param3d1(xg,yg, list(z,-9*ones(1,n)), flag=[0 0])
xtitle("Bilinear interpolation of 2sin(x)sin(y)")
legends("interpolation points",-9,1)
xselect()
 
  

See Also

linear_interpn ,   cgal_interp3 ,  

for more details see CGAL Manual.

This function uses the Interpolation package of CGAL, which is under QPL license. See License Terms

Authors

Naceur MESKINI.