TUpolyExp3D TCL UTILITIES USER MANUAL TUpolyExp3D
SYNOPSIS
Return the 3D polynomial expansion of an (X,Y,Z) set of values.
PACKAGE
TCLUTILS
NAME
TUpolyExp3D
USAGE
set rV  [TUpolyExp3D  X Y Z nC A Order {Offset} {uLim} {lLim}]
INPUT DEFINITIONS
X - Input X Variable
Y - Input Y Variable
Z - Input Z Variable
nC - The number of polynomial coefficients
A - Array of polynomial coefficients
Order - Order of polynomial being solved
Offset - Optional offset into the polynomial coefficient array. Default is 0.
uLim - Optional upper limit clamp. Produced values above this limit are clamped to it. If uLim and lLim are identical this check is bypassed. Default is 0.
lLim - Optional lower limit clamp. Produced values below this limit are clamped to it. If uLim and lLim are identical this check is bypassed. Default is 0.
RETURN DEFINITION
rV - The result of the polynomial expansion.
DESCRIPTION
TUpolyExp3D solves polynomials of the form:
rV = A(0) + A(1)X + +A(2)Y + A(3)Z + A(4)X2 + A(5)XY + A(6)XZ + A(7)Y2 + A(8)YZ + A(9)Z2 ...
        
The result is returned through the procedure. The routine provides for an optional offset into the coefficent array as well as the ability to clamp the returned value to either an upper or to a lower limit. Setting the upper and lower limits to the same value (the default condition) turns off the limit checking feature.
ERRORS
None Generated
C BACKING
NO
EXAMPLE(S)
# SOLVE for the sum of the squares of X, Y, and Z

set A(0) 0.0
set A(1) 0.0
set A(2) 0.0
set A(3) 0.0
set A(4) 1.0
set A(5) 0.0
set A(6) 0.0
set A(7) 1.0
set A(8) 0.0
set A(9) 1.0


set rV [TUpolyExp3D 4.0 2.0 1.0 10 A 2 ]
puts stderr "4^2 + 2^2 + 1^2 = $rV"

> 4^2 + 2^2 + 1^2 = 21.0

      
Oct 22, 2006