Why need expressions? Language-independent expression
evaluations used in various DM2003 features:
Define axis and series
expressions for curve transformations without actual data changes;
Define worksheet columns expressions
to display values of any function of worksheet data;
Perform arbitrary calculations on columns
and lines in the data windows;
Evaluate formula with different values of parameters in special Calculator Dialog;
Manually transform curves with visual feedback using Manual Fitter tool;
Fit numeric data with selected expression and
found "best fit" parameters values.
Any expression in DM2003 consists of function and parameter names, operator
signs, parenthesis and spaces. While all valid operators and, in most cases,
internal functions are allowed in almost any expression, available set of
parameters depends on the feature that uses given expression. All names are
case-insensitive.
Built-in function names, X denotes argument(s):
Trigonometric functions: ARCTAN(X), COS(X), SIN(X), TAN(X) - standard
functions, DEG(X) - converts radians to degrees, RAD(X) - converts degrees to
radians, PI function w/o parameters just returns "pi" number.
Standard mathematical functions: ABS(X), EXP(X), LN(X), LOG(X), SQR(X),
SQRT(X) and RANDOM
function that has no parameters and returns random number from 0 to 1.
Boolean logic functions: AND(X1,X2,...), OR(X1,X2,...), XOR(X1,X2,...)
(multiple arguments are allowed!), TRUE and FALSE constants. Note that TRUE is equal
to 1.0,
FALSE is 0.0 real numbers, and you may freely mix numeric and Boolean
expressions, but numeric function arguments must be exactly 0.0 or 1.0.
Miscellaneous functions: FRAC(X) - returns fractional part of the
argument, INT(X) - integer part; MAX(X1,X2,...), MIN(X1,X2,...) - found
maximal/minimal value, ROUND(X) - rounds value, SGN(X)
- returns argument sign (+1/-1).
Special functions used in DM2003: Time - no arguments, returns GetTickCount();
f_VDP(Ra,Rb) - returns van der Pauw formfactor; Ro_VDP(Ra,Rb[Ohm]; d[cm]) - returns resistivity for
van der Pauw four-probe method; GCX(M,Fi,Gx,Gy), GCY(M,Fi,Gx,Gy) - returns real and
imaginary part of impedance Z for G-compensation method;
OSCX(ZoX,ZoY,ZsX,ZsY,ZX,ZY), OSCY(ZoX,ZoY,ZsX,ZsY,ZX,ZY)
- the same but for Open/Short compensation; InvCX(Re,Im), InvCY(Re,Im) - invert complex
value; Table(X,C) - returns value from column C in the position of the internal
calibration table (see Options|Application dialog box and Options|Install table
commands) calculated by X value from table key column.
Operators:
Standard set of arithmetic operators is supported:
"+", "-", "*",
"/", "^"(power)
Plot axes, plot series and worksheet column expressions: a..z - column values,
cx, cy - synonyms for X and Y columns (this feature allows you to use the
same expression for different files); num - relative number of line in the data series
(0 means start line), absnum - absolute number of line in
the associated worksheet (both used only for series expressions).
Calculator Dialog (Process|Calculation|Calculator dialog):
a..z - column values, cx, cy - synonyms for X and Y columns (for worksheet
calculator tool X,Y columns are defined in worksheet header, for plot
calculator tool these values are not column values but the coordinates of
the clicked point).
Recalculate Data Range operation: same as the above,
cx, cy
meaning depends on active viewer (plot or worksheet).
Copy Function Tool: same as the above,
but cy parameter means Y(X) values from the source data range.
Manual Fitter Tool: the same as for series expressions,
additionally p1 and p2 parameters are allowed.
NLSF Fitter Tool: the only allowed parameter identifiers are
cx (for fitting function argument) and fitting parameters (p1..p26).
Multi-X NLSF Fitter Tool: independent variables (function
arguments) must be denoted cx1..cx26; fitting parameters are the same as in
the standard NLSF Fitter Tool (p1..p26).
Notice: DM2003 application supports global history list
for all features that uses expressions. This list may be remembered as a part of
configuration information. Also, you can define your own
functions for use in expression evaluator and in fitters.