cics_explicit function

Construct the explicit form of non-uniform clamped interpolating cubic spline (NcICS).

Construct the explicit form of non-uniform clamped interpolating cubic spline (NcICS).

cics_explicit constructs the explicit form of non-uniform clamped interpolating cubic spline (via Hermite cubic spline) for nodes uu, function values yy and exterior-node derivatives d.

cics_explicit( uu, yy, d, clrs = c("blue", "red"), xlab = NULL, ylab = NULL, title = NULL )

Arguments

  • uu: a vector of arbitrary nodes (ordered ascendingly), with magnitude n+2, n\ge1.
  • yy: a vector of function values pertaining to nodes in uu.
  • d: a vector of two values of derivative, in the first and the last node of uu.
  • clrs: a vector of colours that are used alternately to plot the graph of spline's components.
  • xlab: a title (optional parameter) for the x axis.
  • ylab: a title (optional parameter) for the y axis.
  • title: a title (optional parameter) for the plot.

Returns

a list with components - spline_coeffs: matrix, whose i-th row contains coefficients of non-uniform ICS's i-th component.

  • spline_polynomials: list of NcICS's components string representations.

  • B: 4-element array of (n+1)x(n+4) matrices, whereas element in i-th row and j-th column of l-th matrix contains coefficient by x^{l-1} of cubic polynomial that is in i-th row and j-th column of matrix B from spline's explicit form

S=B.γ. S=B.\gamma.
  • gamma: γ=\gamma= vector of spline coefficients - function values and exterior-node derivatives that takes part in the explicit form S=B.γS=B.\gamma.

  • aux_BF: A basis function of the spline

  • aux_tridiag_inverse: An inverse of the tridiagonal matrix used for spline derivatives construction

Examples

cics_explicit( uu = c(1, 2.2, 3, 3.8, 7), CERN$y[1:5], d=c(0,-2), xlab="X axis", ylab="Y axis" ) uu <- c(0, 1, 4, 6); yy <- c(4, 5, 2, 1.8); sp <- cics_explicit(uu, yy, c(1,0)) sp$spline_polynomials ### <~~> ### Spline components' coefficients explicit_spline(sp$B, sp$gamma) sp$spline_coeffs == .Last.value
  • Maintainer: Lubomir Antoni
  • License: GPL-2
  • Last published: 2024-01-10

Useful links