MEAN returns the mean or averaged value of a data set

Syntax

  1. MEAN(Pno%, Ndim%, "ColLab$_1",.., "ColLab$_Ndim%")
  2. MEAN(0, Npoints%, x_1, y_1, x_2, y_2,...)
  3. MEAN(@ObjFn(..), Ndim%, @ObjColPar_1,.., @ObjColPar_Ndim%)
  4. MEAN(Telitab$, Ndim%, "ColLab$_1",.., "ColLab$_Ndim%")

Arguments

  • Pno% 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 theTeLiTab set in the expressions' data slot.
  • Npoints% is the number of points (x,y) that are given in direct definition.
  • @ObjFn() refers to the Object from which data will be used.
  • TeLiTab$ refers to the string parameter that contains the TeLiTab.
  • Ndim% is the number of dimensions (or columns in the table...).
  • "ColLab$_1" and @ObjColPar_1 etc refer to the columns that will be used

Remarks

  1. See also Telitab access for a generic description on the use of TeLiTab data
  2. Similar to other Data analysis functions, the MEAN is a convenient way to evaluate data. Please also look at these functions for syntax examples
  3. For a multi-dimensional dataset the MEAN will be determined over all columns. This means that all defined values will be added and divided by the total number of values in the selected columns 

Examples

Syntax 1: TeLiTab in Dataslot

In this example syntax 1 is used, the TeLiTab is addressed in the Dataslot.

Let y be defined by

y = MEAN(1, 2, "XC", "YC")

And the data slot of the relation contains the folllowing Telitab set:

|MEAN1| 

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|

This relation returns a value of y=22.00.

Remarks

  • If 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.
  • If you use |1| as data header instead of |MEAN1| it means that any special function in that expression referring to a data set Pno%=1 can access that data set.

Syntax 2: Direct definition

In direct definition, the values are stated in the Relation itself. This method can only be used for 2D derivatives

The syntax is 

MEAN( Pno%, Npoints%, x_1, x_2,.., x_n)

If Pno%=0 then all x_i values should be numerical expressions. The minimum number of values in the list is 2.

Let y be defined by

y = MEAN(0, 4, 1, 2, 4, 9)

This Equation results in y=4.

Syntax 3 and 4: TeLiTab in object or string

These methods are similar to syntax 1, only data from external telitabs or objects is used.


 

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


  • No labels