Difference between revisions of "Herm spline.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Sync syntax/arguments/outputs with current Spinach source)
(Restore pre-bulk-edit wiki content)
Line 1: Line 1:
 
{{DISPLAYTITLE:herm_spline.m}} __NOTOC__
 
{{DISPLAYTITLE:herm_spline.m}} __NOTOC__
 
 
Cubic Hermite spline on [0,1] interval from values and derivatives at the interval edges.
 
Cubic Hermite spline on [0,1] interval from values and derivatives at the interval edges.
  
 
==Syntax==
 
==Syntax==
  
y=herm_spline(f0,df0,f1,df1,x)
+
    y=herm_spline(f0,df0,f1,df1,x)
  
 
==Arguments==
 
==Arguments==
  
f0  - function value(s) at the left edge, a real
+
    f0  - function value(s) at the left edge, a real
 
           scalar or array
 
           scalar or array
 
+
 
     df0 - function derivative(s) at the left edge,
 
     df0 - function derivative(s) at the left edge,
 
           a real scalar or array
 
           a real scalar or array
 
+
 
     f1  - function value(s) at the right edge, a real
 
     f1  - function value(s) at the right edge, a real
 
           scalar or array
 
           scalar or array
 
+
 
     df1 - function derivative(s) at the right edge,
 
     df1 - function derivative(s) at the right edge,
 
           a real scalar or array
 
           a real scalar or array
 
+
 
     x  - query point(s) inside [0,1] interval,
 
     x  - query point(s) inside [0,1] interval,
 
           a real scalar or array
 
           a real scalar or array
 
Function values and derivatives can be scalars (in which case
 
the same spline is evaluated at all query points) or arrays of
 
the same size as x, in which case multiple splines are evalua-
 
ted at their corresponding query points.
 
  
 
==Outputs==
 
==Outputs==
  
y  - the value of the spline(s) at the query point(s)
+
    y  - the value of the spline(s) at the query point(s)
  
 
==Notes==
 
==Notes==
 
 
Function values and derivatives can be scalars (in which case the same spline is evaluated at all query points) or arrays of the same size as x, in which case multiple splines are evaluated at their corresponding query points.
 
Function values and derivatives can be scalars (in which case the same spline is evaluated at all query points) or arrays of the same size as x, in which case multiple splines are evaluated at their corresponding query points.
  
 
==See also==
 
==See also==
 
 
[[Kernel_utilities#Numerical_infrastructure|Numerical infrastructure]]
 
[[Kernel_utilities#Numerical_infrastructure|Numerical infrastructure]]
  
  
 
''Version 2.6, authors: [[Ilya Kuprov]]''
 
''Version 2.6, authors: [[Ilya Kuprov]]''

Revision as of 15:48, 5 April 2026

Cubic Hermite spline on [0,1] interval from values and derivatives at the interval edges.

Syntax

    y=herm_spline(f0,df0,f1,df1,x)

Arguments

   f0  - function value(s) at the left edge, a real
         scalar or array

   df0 - function derivative(s) at the left edge,
         a real scalar or array

   f1  - function value(s) at the right edge, a real
         scalar or array

   df1 - function derivative(s) at the right edge,
         a real scalar or array

   x   - query point(s) inside [0,1] interval,
         a real scalar or array

Outputs

   y   - the value of the spline(s) at the query point(s)

Notes

Function values and derivatives can be scalars (in which case the same spline is evaluated at all query points) or arrays of the same size as x, in which case multiple splines are evaluated at their corresponding query points.

See also

Numerical infrastructure


Version 2.6, authors: Ilya Kuprov