Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

DQUAD returns a double quadratic interpolated value in two or more dimensions

Syntax

  1. DQUAD(Pno%, Ndim%, "ColLab$_1",.., "ColLab$_Ndim%", Xint_1,..,Xint_Ndim%-1, [Xtrap%=0,1])
  2. DQUAD(0, Npoints%, x_1, y_1, x_2, y_2,…, x_n, y_n, xint, [Xtrap%=0,1]) (2D interpolation only)
  3. DQUAD(@ObjFn(..), Ndim%, @ObjColPar_1,.., @ObjColPar_Ndim%, Xint_1,..,Xint_Ndim%-1, [Xtrap%=0,1])
  4. DQUAD(Telitab$, Ndim%, "ColLab$_1",.., "ColLab$_Ndim%", Xint_1,..,Xint_Ndim%-1, [Xtrap%=0,1])

Arguments

  • Pno% is , is the number that refers to the TeLiTab sets in the Data slot. Pno% should be an integer value or a parameter which is assigned an integer value and is the number of the TeLiTab set in the expressions' data slot.
  • Npoints% is  is the number of points (x,y) that are given in direct definition.
  • @ObjFn() refers  refers to the Object from which data will be used.
  • TeLiTab$ TeLiTab$ refers to the string parameter that contains the TeLiTab.
  • Ndim% is  is the number of dimensions (or columns in the table...).
  • "ColLab$_1" and @ObjColPar_1 refer  refer to the column that will be used as the parameter X in the interpolation.
  • "ColLab$_2" and @ObjColPar_2 refer  refer to the column that will be used as the parameter Y in the interpolation. etc.
  • Xint is  is the parameter to do interpolation on.
  • Xtrap% is  is an optional argument to switch off a warning in the event of extrapolation. If Xtrap% = 1 no warning is given. The value is not required and is 0 by default (not suppressing the warning).

Remarks

  1. See also Telitab access for a generic description on the use of TeLiTab data
  2. Similar to other Data analysis functions, the DQUAD function provides a convenient way to manipulate curve data, either available in the knowledge base or produced by satellites. The routine contains a double quadratic interpolator. Extrapolation outside the x-range is performed parabolic.
  3. Please realise the dataset provided to DQUAD should be a function. Every x-value should have one y-value. When you do not have a valid dataset, please look at GAUSSINT() or LEASQ()

Examples

Syntax 1: TeLiTab in Dataslot


The function y is defined as

y = DQUAD(1, 2, "XC", "YC", x, 1) 

With the following Telitab set in the Data slot:

|DQUAD1|
0
2 "XC" "YC"
"1" 1 1
"2" 2 4
"3" 3 9
"4" 4 16
"5" 5 25
"6" 6 36
"7" 7 49
"8" 8 64
"9" 9 81
"10" 10 100|

For x = 2.5, this relation returns

y=6.25

NOTE: In case you apply the symbolic addressing of the columns for the description of the point on the curve or surface to compute the differential for, e.g. "Par_x" and "Par_y", please make sure that your Telitab set contains these names. If not, an error message is generated and the calculation is stopped.

...

The expression is the following:

R_TOT=DQUAD(1, 3, "DRAFT", "VS", "R-TOT", Draft, Vs)

And the dataslot containing:

|DQUAD1|
0
3 "DRAFT" "VS" "R-TOT"
"1" 5 10 10000
"2" 5 11 11000
"3" 5 12 12000
"4" 6 10 11000
"5" 6 11 12000
"6" 6 12 13000
"7" 7 10 12000
"8" 7 11 13000
"9" 7 12 14000|

For Draft=5.6 m and Vs=11.8 m/s, the function returns

 R R-TOT=12400 N

The matrix interpolation can be applied in all except Method 2, obviously not in Method 2 since only x,y data points are provided in that case.

...

In direct definition, the points needed for interpolation are stated in the Relation itself. This method can only be used for 2D interpolation. The syntax is

DQUAD( Pno%, Npoints%, x_1, y_1, x_2, y_2,…, x_n, y_n, Xint, [DirivNo%=1])

If Pno%=0 then all x_i and y_i values should be numeric expressions. The minimum number of x,y data points Npoints% in the list is 2 in which case the interpolation (and differentiation) is performed linear. Let y be a function defined by

y = DIFF DIFF(0, 4, 1, 1, 2, 4, 3, 9, 4, 16, x, 1)

For x=2.5, this equation returns

y=6.25

Syntax 3 and 4: TeLiTab in object or string


These methods are similar to syntax 1, for information on how to acces the TeLiTab data with those methods see: TeLiTab access. 


 

Quick links: Function Functions overview | Attribute overview | Constants overview | Dimensions overview