next up previous contents
Next: Specify a transfer function Up: Filter Analysis and Design Previous: Syntax   Contents


Variables and Expressions

A string of characters can can be used as a FA variable identifier if it has the following properties:

Specifically, note that a, b, c, d, f, g, h k, m, and w, as well as their uppercase equivalents, are all FA keywords, and hence cannot be used as variable identifiers.

The variables represent real numbers or expressions and can in turn be used in expressions, for instance:

y = 2 * x + sin(z);
output: y;
x = 1;
z = 2;
output: y;
produces the following output.
2.9093
Table 1 shows the available mathematical functions.

Table 1: FA mathematical functions that can be used in expressions.
+ binary addition
- binary subtraction
* binary multiplication
^ binary power
sin(x) sine of x
cos(x) cosine of x
tan(x) tangent of x
asin(x) arc sine of x
acos(x) arc cosine of x
atan(x) arc tangent of x
log(x) natural logarithm of x
log10(x) logarithm with base 10 of x
abs(x) absolute value of x
sqrt(x) square root of x
exp(x) ex
cn(x, k) Jacobi cn of x with modulus k
sn(x, k) Jacobi sn of x with modulus k
dn(x, k) Jacobi dn of x with modulus k


The functions sn, cn, and dn are the Jacobian elliptic functions.

A number of FA variables have a predefined value, although it is possible to set them to any other value. Some of these have a special meaning for FA, which is explained in appropriate sections. The predefined FA variables are in Table 2.

Table 2: Predefined FA variables.
variable value section
bla 0 13.2
epsabs 1.10-6 14.1
epsrel 1.10-6 14.1
fmax 8 13.1
fr 0 7.2.4, 10.2.1, 10.3
itmax 0 14.3
noisefactor 1 10
pi 3.14159…  
si 1 10.3
so 1 10.3



next up previous contents
Next: Specify a transfer function Up: Filter Analysis and Design Previous: Syntax   Contents
2009-06-03