Measurement
331
cpx(scalar a, scalar
b)
returns a complex value (a+ib) from two scalar values
exp(complex a) returns the exponential of a
im(complex a)
returns the imaginary part of a as the scalar part of the
result (zeroes the imaginary part)
ln(complex a) returns the natural logarithm of a
log10(complex a) returns the base 10 logarithm of a
mag(complex a) returns sqrt(a.re*a.re+a.im*a.im)
phase(complex a) returns atan2(a) in degrees
pow(complex
a,complex b)
returns a to the power b
re(complex a) returns the scalar part of a (zeroes the imaginary part)
sin(complex a) takes a in radians and returns the sine
sqrt(complex a)
returns the square root of a, with phase angle in the
half-open interval (-pi/2, pi/2]
tan(complex a) takes a in radians and returns the tangent
Constants
e 2.71828182845904523536
PI 3.14159265358979323846
• Mutual transformation is automatically made for scalar and
complex.
scalar(x) -> complex(x, 0)
complex(x, y) -> scalar(x)
Advanced Math Functions
In the following table: a,b,c,d are arguments of complex value that are
used in the function. For 2-port network measurement: a,b,c,d
corresponds to Sii,Sji, Sij, Sjj respectively.
• The functions can also be defined by scalar arguments with port
numbers of the ENA. For example, the function, kfac(1,2)