User manual
BrainMaster 2.5 Software User Manual
531-346 v1.0 2/10/2012 Page 70 of 82
REF
Peakf(channel, low, high)
returns peak frequency (highest amplitude) from FFT in a
band for a channel. E.g. Modf(2, 4, 6) returns the peak
frequency in channel 2 in band from 4 Hz to 6 Hz
Special Built-in Constants:
Schumann, SCH
Schumann Frequency = 7.81
PHI, GOLDEN, GM
Golden Mean = 1.618
PI
PI = 3.14159
Standard Operators: Note: all arguments and parameters are treated as double precision floating point values
+ - * /
add, subtract, multiply, divide
%
modulus returns the remainder after an integer division
^
power: y = x ^ 2
()
parenthetical gropuing, unlimited, e.g. (2 + BETA) /
THETA
;
semicolon, needed at end of each equation in formula
//
comment, single line
/*…*/
comment, multiple lines
Priority of Operators:
()
highest
^
next
-x (unary minus)
next (e.g. y=-x^2, the ^ occurs before - )
*/^
next
+-
lowest
Standard Built-in Functions:
abs(x)
return absolute value
acos(x)
calculate arccosine
asin(x)
calculate arcsine
atan(x)
calculate arctangent
atan2(x,y)
calculate arctangent with two parameters to preserve
quadrant angle
bessj(n,v)
Bessel function of the first kind. n is order and v is input
value
bessy(n,v)
Bessell function of the second kind. n is order and v is
input value.
Ceil(x)
Find integer ceiling
Cos(x)
Calculate cosine
Cosh(x)
Calculate hyperbolic cosine
exp(x)
calculate exponential function "e to the x"
floor(x)
Find integer floor
hypot(a,b)
calculate hypotenuse of right triangle
log(x)
calculate natural logarithm
log10(x)
calculate base-10 logarithm
max(x,y)
return larger of two values