SUBROUTINE CDPLFN ( * * inputs * : VAR, COEFF, * * outputs * : F0, FVAR, FCOEFF) * * Module number: * * Module name: * * Keyphrase: * ---------- * Calculate functional values and derivatives of a plane in 3-D * * Description: * ------------ * For the function: * * F = A * X + B * Y + C - Z * * calculate the functional value F0, for given A, B, C, X, Y, and Z. Also * calculate the partial derivatives of F relative to A, B, C * (coefficents) and X, Y, and Z (variables). * * COEFF(1) = A, COEFF(2) = B, COEFF(3) = C, VAR(1) = X, VAR(2) = Y, VAR(3) = Z * * FORTRAN name: CDPLFN.FOR * * Keywords of accessed files and tables: * -------------------------------------- * Name I/O Description / Comments * None * * Subroutines Called: * ------------------- * CDBS: * None * SDAS: * None * Others: * None * * History: * -------- * Version Date Author Description * 1 02-16-87 J.-C. HSU design and coding * *------------------------------------------------------------------------------- * *== input: * --observed variables at a given point * --(e. g. X and Y coordinates) DOUBLE PRECISION VAR(*), * --coefficients in the given function : COEFF(*) * *== output: * --functional value DOUBLE PRECISION F0, * --partial derivativeS relative to the * --variables and coefficients : FVAR(*), FCOEFF(*) * *------------------------------------------------------------------------------ * * functional value * F0 = COEFF(1) * VAR(1) + COEFF(2) * VAR(2) + COEFF(3) - VAR(3) * * partial derivatives relative to the variables * FVAR(1) = COEFF(1) * FVAR(2) = COEFF(2) * FVAR(3) = -1.D0 * * partial derivatives relative to the coefficients * FCOEFF(1) = VAR(1) * FCOEFF(2) = VAR(2) * FCOEFF(3) = 1.D0 * RETURN END