MATCHCASE returns the case number of the value(s) that best match the arguments given in the function

Syntax

  1. MATCHCASE(Pno%, Ndim%, "ColLab$_1",.., "ColLab$_Ndim%", Val_1,..,Val_Ndim%-1, [Mode%=0,1])
  2. MATCHCASE(@ObjFn(..), Ndim%, @ObjColPar_1,.., @ObjColPar_Ndim%, Val_1,..,Val_Ndim%-1, [Mode%=0,1])
  3. MATCHCASE(Telitab$, Ndim%, "ColLab$_1",.., "ColLab$_Ndim%", Val_1,..,Val_Ndim%-1, [Mode%=0,1])

Arguments

Remarks

  1. See also Telitab access for a generic description on the use of TeLiTab data
  2. Similar to other Data analysis functions, the MATCHCASE is a convenient way to evaluate data. Please also look at these functions for syntax examples
  3. The case in the database with the smallest Euclidian distance [ http://en.wikipedia.org/wiki/Euclidean_distance] to the case (or pattern) given through the MATCHCASE argument list, is assumed to be the best match. For this purpose, the database is scaled per column between 0 and 1, on the basis of the minimum and maximum column value (only if minimum<maximum). If no match is found for Mode%=0 (complete match), an error message is issued and the session is terminated.

Examples

The function:

A = MATCHCASE(1,3,"XC","YC","ZC",2,6,13,1)

With in the Dataslot:

|MATCHCASE1| 

3 "XC" "YC" "ZC" 
"1" 1 9 10 
"2" 2 8 11 
"3" 3 7 12 
"4" 4 6 13 
"5" 5 5 14 
"6" 6 4 15|

Results in: A=3. This means that case three has the smallest Euclidian distance with the dataset: 2,6,13. 


 

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