Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.1 - English

Change language to:
Français - 日本語 - Português

Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Interpolation > bsplin3val


3d spline arbitrary derivative evaluation function

Calling Sequence



xp, yp, zp

real vectors or matrices of same size


tlist of type "splin3d", defining a 3d tensor spline (called s in the following)


vector with 3 components [ox,oy,oz] defining which derivative of s to compute.


vector or matrix of same format than xp, yp and zp, elementwise evaluation of the specified derivative of s on these points.


While the function interp3d may compute only the spline s and its first derivatives, bsplin3val may compute any derivative of s. The derivative to compute is specified by the argument der=[ox,oy,oz] :

So der=[0 0 0] corresponds to s, der=[1 0 0] to ds/dx, der=[0 1 0] to ds/dy, der=[1 1 0] to d2s/dxdy, etc...

For a point with coordinates (xp(i),yp(i),zp(i)) outside the grid, the function returns 0.


n = 20;  // n x n x n  interpolation points
x = linspace(0,2*%pi,n); y=x; z=x; // interpolation grid
[X,Y,Z] = ndgrid(x,y,z); V = f(X,Y,Z);
tl = splin3d(x,y,z,V,[5 5 5]);

// compute f and some derivates on a point
// and compare with the spline interpolant 
xp = grand(1,1,"unf",0,2*%pi); 
yp = grand(1,1,"unf",0,2*%pi); 
zp = grand(1,1,"unf",0,2*%pi); 

f_e = f(xp,yp,zp)
f_i = bsplin3val(xp,yp,zp,tl,[0 0 0])

fx_e = fx(xp,yp,zp)
fx_i = bsplin3val(xp,yp,zp,tl,[1 0 0])

fxy_e = fxy(xp,yp,zp)
fxy_i = bsplin3val(xp,yp,zp,tl,[1 1 0])

fxyz_e = fxyz(xp,yp,zp)
fxyz_i = bsplin3val(xp,yp,zp,tl,[1 1 1])

fxxyz_e = fxxyz(xp,yp,zp)
fxxyz_i = bsplin3val(xp,yp,zp,tl,[2 1 1])

See Also

  • splin3d — spline gridded 3d interpolation
  • interp3d — 3d spline evaluation function


  • R.F. Boisvert, C. De Boor (code from the CMLIB fortran lib)
  • B. Pincon (scilab interface)
<< Interpolation Interpolation cshep2d >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Mar 03 10:59:36 CET 2011