next up previous contents index
Next: Subroutine logical_array_print Up: Module linearalgebra_module Previous: Subroutine Matrix_Factorised_Inverse   Contents   Index

Subroutine fit_cubic


\begin{boxedminipage}{\textwidth}
\begin{verbatim}call fit_cubic(x0,y0,y0p,x1, &
y1,y1p,coeffs)\end{verbatim}
\end{boxedminipage}

Fit a cubic polynomial to a function given its values ($y_0$ and $y_1$) and its derivative ($y^\prime_0$ and $y^\prime_1$) at two points ($x_0$ and $x_1$)

\begin{displaymath}
y = ax^3 + bx^2 + cx + d
\end{displaymath}

x0, y0, y0p -- real(dp), intent(in)

$x_0$, $y_0$, $y^\prime_0$

x1, y1, y1p -- real(dp), intent(in)

$x_1$, $y_1$, $y^\prime_1$

coeffs -- real(dp), intent(out), dimension(4)

(/a,b,c,d/)

logical_array_print subroutine

gabor 2009-06-30