MATCHCASE returns the case number of the value(s) ithat best match the arguments given in the function
Syntax
- MATCHCASE(Pno%, Ndim%, "ColLab$_1",.., "ColLab$_Ndim%", Val_1,..,Val_Ndim%-1, [Mode%=0,1])
- MATCHCASE(@ObjFn(..), Ndim%, @ObjColPar_1,.., @ObjColPar_Ndim%, Val_1,..,Val_Ndim%-1, [Mode%=0,1])
- MATCHCASE(Telitab$, Ndim%, "ColLab$_1",.., "ColLab$_Ndim%", Val_1,..,Val_Ndim%-1, [Mode%=0,1])
...
- See also Telitab access for a generic description on the use of TeLiTab data
- Similar to other Data analysis functions, the MATCHCASE is a convenient way to evaluate data. Please also look at these functions for syntax examples
- 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|
0
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|
...