END HELP
HELP abs(x)
An object that returns the absolute value 
of x.

USE
Use abs(x) to obtain the absolute value of
the number in a container.  x may be any
shape and of the type Int32, Real, Coord,
Waveform, Complex, PComplex, or Spectrum.
For types Int32, Real, Coord, and Waveform,
the same type is returned.  For types
Complex, PComplex, and Spectrum, the absolute
value is the magnitude of the complex number;
therefore, a Real of the same shape is
returned.

LOCATION
Math ==> Real Parts ==> abs(x)

EXAMPLE
abs(-34) returns 34.

NOTES
Mappings are retained in the result.  The
largest negative Int32 will cause an error.

SEE ALSO
Complex Parts, mag(x), Real Parts, and
signof(x).
END HELP
HELP acos(x)
An object that returns the arccosine of x.

USE
Use acos(x) to generate the arccosine of the
x data, with the result in the range of 0 to
PI.  x can be any shape and of type Int32,
Real, Coord, Waveform, Complex, PComplex, or
Spectrum.  The return value will be in the
current Trig Mode units.  Int32 returns a
Real; all others will return the same type.
All will return the same shape as x.

LOCATION
Math ==> Trig ==> acos(x)

EXAMPLE
acos(1) returns 0 with Trig Mode set to
Degrees.

acos((1.54308, @0)) returns (0.9999,
@1.87079) with Trig Mode set to Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
acosh(x), cos(x), sin(x), tan(x), and Trig.

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP acosh(x)
An object that returns the hyperbolic
arccosine of x.

USE
Use acosh(x) to generate the hyperbolic
arccosine of the x data.  x can be any shape
and of type Int32, Real, Coord, Waveform,
Complex, PComplex, or Spectrum.  The return
value will be in the current Trig Mode units.
Int32 returns a Real; all others will return
the same type.  All will return the same
shape as x.

LOCATION
Math ==> Hyper Trig ==> acosh(x)

EXAMPLE
acosh(1) returns 0 with Trig Mode set to
Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
acos(x), cosh(x), Hyper Trig, sinh(x), and
tanh(x).

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP acot(x)
An object that returns the arccotangent of x.

USE
Use acot(x) to generate the arccotangent of
the x data, simply returning atan(1/x).
acot(0) will return PI/2.  x can be any shape
and of type Int32, Real, Coord, Waveform,
Complex, PComplex, or Spectrum.  The return
value will be in the current Trig Mode units.
Int32 returns a Real; all others will return
the same type.  All will return the same
shape as x.

LOCATION
Math ==> Trig ==> acot(x)

EXAMPLE
acot(1) returns 45 with Trig Mode set to
Degrees.

acot((1.31303, @PI/2)) returns (1.00,
@-1.57079) with Trig Mode set to Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
acoth(x), atan2(y,x), cos(x), sin(x), tan(x),
and Trig.

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP acoth(x)
An object that returns the hyperbolic
arccotangent of x.

USE
Use acoth(x) to generate the hyperbolic
arccotangent of the x data.  x can be any
shape and of type Int32, Real, Coord,
Waveform, Complex, PComplex, or Spectrum.
The return value will be in the current Trig
Mode units.  Int32 returns a Real; all others
will return the same type.  All will return
the same shape as x.

LOCATION
Math ==> Hyper Trig ==> acoth(x)

EXAMPLE
acoth(1.5) returns 0.8047 with Trig Mode set
to Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
acot(x), cosh(x), coth(x), Hyper Trig,
sinh(x), and tanh(x).

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP + (add)
An object that performs an arithmetic
addition on two operands.

USE
Use + to add the values of two containers.
The two containers may be of any type and of
any shape.  If one of the containers is an
array, the other must be either a scalar or
an array of the same size and shape.  The
result is a container of the highest type
with the same shape as the operands.

If both operands are of type Coord, they
must have their independent variable(s) match
exactly or an error is returned.  The
addition is only performed on the dependent
(last) variable.

Text performs addition as a concatenation.
Enums convert to Text for the addition.  Note
that this addition on two strings is not the
same as the concat(x, y) function.  With the
concat function, concat("hello","there")
yields a one-dimensional array, two long
["hello" "there"].

LOCATION

Math ==> + - * / ==> +

EXAMPLE
Array plus a scalar:  [1 2 3] + 3 returns [4
5 6].

Two Complex scalars:  (2,4) + (1,3)
returns (3,7).

Two arrays:  [1 2 3] + [4 5 6] returns [5
7 9].

Two Coord scalars:  coord(1,3) +
coord(1,5) returns coord(1,8).

Two Coord scalars:  coord(1,3) +
coord(2,5) returns an error.

Two Text:  "hello" + "there" returns
"hellothere".

NOTES
If either of the containers is mapped (that
is, of type Waveform, Spectrum, Coord, or a
mapped array of any other type), the other
container must be unmapped or have identical
mappings.  The return value will have the
same mappings as the operands; otherwise an
error is returned.

SEE ALSO
concat(x,y), / (divide), * (multiply), and -
(subtract).
END HELP

HELP + - * /
A menu item.

USE

Use + - * / to access the following objects
which perform arithmetic functions on two
operands:
* +
* -
* *
* /
* ^
* mod
* div

LOCATION

Math ==> + - * / ==>

NOTES
Dyadic operations which are given two
different types convert the lower type to the
higher of the two types.  See the type
conversion information and the hierarchy of
types in the "Using Dyadic Operators" section
at the beginning of this chapter.

In the dyadic operation example below,
adding an array and a scalar performs the
operation on each element of the array.  The
result is an array of the same size and shape
as the array operand.  For example, a scalar
plus a linear array of four elements, 5 + [1
2 3 6], produces the linear array of four
elements [6 7 8 11].  The same is true for
operations like exponentiation.  Thus, 2 ^ [3
4] produces [8 16].

Dyadic operations which are given two
arrays require the operands to be conformant,
that is, have the same size and shape.  The
result is an array with the same size and
shape as the operands.  The operation is done
on an element by element basis.  For example,
adding two linear arrays of three elements
each results in a linear array of three
elements long.  [1 2 3] + [4 5 6] produces [5
7 9].  If the two arrays are not conformant,
the result is an error.
END HELP
HELP Ai(x)
An object used to calculate the Airy
fractional order Bessel function of x.

USE
Use Ai(x) to find the Fractional order Bessel
function Airy of the x.  The x input may be
of any size and shape and of the type Int32,
Real, Coord, or Waveform.  For x input of all
types, the same output type is returned,
except for Int32 which returns a Real type.
For Coord input types, the operation is done
on the dependent variable.

LOCATION
AdvMath ==> Bessel ==> Ai(x)

EXAMPLE
Ai(10) returns 0.110475325528986.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

SEE ALSO
Bi(x), j0(x), j1(x), jn(x,n), y0(x), y1(x),
and yn(x,n).
END HELP
HELP AND
An object that performs a logical AND
operation on two operands.

USE
Use AND to determine whether the value(s) of
two containers are both logically true
(non-zero).  The two containers may be of any
type and of any shape.  If one of the
containers is an array, the other must be
either a scalar or an array of the same size
and shape.  The result is an Int32 of the
same shape as the operands, with value(s) 0
or 1.  If both operands are non-zero, the
value of the AND operation is 1; otherwise
the value is 0.

If both operands are of type Coord, they
must have their independent variable(s) match
exactly or an error is returned.  Only the
dependent (last) variable is considered for
the AND operation.

For Complex, PComplex, and Spectrum
containers, the value of the operand is true
if either part is non-zero.  Text is true if
non-null.  Enums are converted to Text for
the operation.

LOCATION
Math ==> Logical ==> AND

EXAMPLE
A scalar and an array:  3 AND [3 3 3] returns
[1 1 1].

A scalar and an array:  3 AND [-3 0 3]
returns [1 0 1].

Two arrays:  [1 2 3] AND [0 1 (-1)]
returns [0 1 1].

Two arrays:  (1,@90) AND (1,@85) returns
1.

Two Complex scalars:  (2,3) AND (0,1)
returns 1.

Two Complex scalars:  (0,1) AND (1,0)
returns 1.

Two Complex scalars:  (0,0) AND (0,0)
returns 0.

Two Coord scalars:  coord(1,3) AND
coord(1,5) returns 1.

Two Coord scalars:  coord(1,3) AND
coord(2,3) returns an error.

A Text scalar and a scalar number:  "too"
AND 2 returns 1.

A Text scalar and a scalar number:  "" AND
0 returns 0 because one string is null and
the other is not ("0").

NOTES
If either of the containers is mapped (that
is, of type Waveform, Spectrum, Coord, or a
mapped array of any other type), the other
container must be unmapped or have identical
mappings.  The return value will have the
same mappings as the operands; otherwise an
error is returned.

Note that the If/Then object requires the
expression(s) inside it to evaluate to either
a scalar or an array, which is either all
zeros or all ones.

SEE ALSO
NOT, OR, Relational, and XOR.

Conditional and If/Then (from "Help On
Features" dialog box)
END HELP
HELP Array
A menu item.

USE
Use Array to access the following objects
which perform miscellaneous functions on
arrays.
* init(x,val)
* rotate(x,numElem)
* concat(x,y)
* sum(x)
* prod(x)

LOCATION
AdvMath ==> Array ==>
END HELP
HELP asin(x)
An object that returns the arcsine of x.

USE
Use asin(x) to generate the arcsine of the x
data with the result in the range of -PI/2 to
+PI/2 for Real values.  x can be any shape
and of type Int32, Real, Coord, Waveform,
Complex, PComplex, or Spectrum.  The return
value will be in the current Trig Mode units.
Int32 returns a Real; all others will return
the same type.  All will return the same
shape as x.

LOCATION
Math ==> Trig ==> asin(x)

EXAMPLE
asin(1) returns 90 with Trig Mode set to
Degrees.

asin((1.1752012, @90)) returns (1, @90)
with Trig Mode set to Degrees.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
asinh(x), cos(x), sin(x), tan(x), and Trig.

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP asinh(x)
An object that returns the hyperbolic arcsine
of x.

USE
Use asinh(x) to generate the hyperbolic
arcsine of the x data.  x can be any shape
and of type Int32, Real, Coord, Waveform,
Complex, PComplex, or Spectrum.  The return
value will be in the current Trig Mode units.
Int32 returns a Real; all others will return
the same type.  All will return the same
shape as x.

LOCATION
Math ==> Hyper Trig ==> asinh(x)

EXAMPLE
asinh(0) returns 0 with Trig Mode set to
Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
asin(x), cosh(x), Hyper Trig, sinh(x), and
tan(x).

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP atan(x)
An object that returns the arctangent of x.

USE
Use atan(x) to generate the arctangent of the
x data, with the result in the range of -PI/2
to +PI/2 for Real values.  x can be any shape
and of type Int32, Real, Coord, Waveform,
Complex, PComplex, or Spectrum.  The return
value will be in the current Trig Mode units.
Int32 returns a Real; all others will return
the same type.  All will return the same
shape as x.

LOCATION
Math ==> Trig ==> atan(x)

EXAMPLE
atan(1) returns 45 with Trig Mode set to
Degrees.

atan((1.5574, @0)) returns (0.999, @0)
with Trig Mode set to Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
atanh(x), atan2(y,x), cos(x), sin(x), tan(x),
and Trig.

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP atan2(y,x)
An object that returns the arctangent of y
divided by x.

USE
Use atan2(y,x) to generate the arctangent of
y divided by x, with the proper sign, in the
range of -PI to +PI for Real values.  x and y
can be any shape and of type Int32, Real,
Coord, Waveform, Complex, PComplex, or
Spectrum.  If one of the containers is an
array, the other must be either a scalar or
an array of the same size and shape.  The
result is a container of the highest type,
with the same shape as the operands.  x and y
are assumed to be in the current Trig Mode
units.  Int32 returns a Real; all others will
return the same type.  All will return the
same shape as x.

LOCATION
Math ==> Trig ==> atan2(y,x)

EXAMPLE
atan2(1, -1) returns 135 with Trig Mode set
to Degrees.

atan2((1, 1), (5, 5)) returns (0.19739, 0)
with Trig Mode set to Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
atan(x), cos(x), sin(x), tan(x), and Trig.

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP atanh(x)
An object that returns the hyperbolic
arctangent of x.

USE
Use atanh(x) to generate the hyperbolic
arctangent of the x data.  x can be any shape
and of type Int32, Real, Coord, Waveform,
Complex, PComplex, or Spectrum.  The return
value will be in the current Trig Mode units.
Int32 returns a Real; all others will return
the same type.  All will return the same
shape as x.

LOCATION
Math ==> Hyper Trig ==> atanh(x)

EXAMPLE
atanh(0.5) returns 0.5493 with Trig Mode set
to Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
atan(x), cosh(x), Hyper Trig, sinh(x), and
tanh(x).

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP bartlet(x)
An object used to apply a Bartlet window to a
time series of values.

USE
Use bartlet(x) to filter the values in x in
the same manner as convolving x with the
spectral transform of the Bartlet function.
This has the effect of suppressing some of
the noise due to the tails of the input
sequence and the potential discontinuities
they represent when sampling periodic
signals.

The input x must be an Array 1D of type
Int32, Real, Coord, or a Waveform, or a
Spectrum.  The same type is returned, except
for Int32, which returns Real.

If x is a Spectrum, it is first converted
to a Waveform using an ifft(x) before the
window is applied.  The result of the window
is then converted back to type Spectrum using
an fft(x).  A Spectrum is returned.

LOCATION
AdvMath ==> Signal Processing ==> bartlet(x)

EXAMPLE
bartlet([1 1 1 1 1 1 1 1]) returns [0.125
0.375 0.625 0.875 0.875 0.625 0.375 0.125].

NOTES
The Bartlet function in the time domain is
represented as 2*(n+0.5)/N, where n is the
position (index) in the array, and N is the
size of the array.  The result will be an
array of the same type as x and will have the
same mappings as x (if any).

For a discussion of sidelobe levels and
coherent gains, see:

Ziemer, Tranter, and Fannin, "Signals and
Systems", Macmillan Publishing, New York, NY,
1983.  ISBN #0-02-431650-4.

SEE ALSO
blackman(x), convolve(a,b), fft(x),
hamming(x), hanning(x), ifft(x), and rect(x).
END HELP
HELP Bessel
A menu item.

USE
Use Bessel to calculate the bessel function
of input data.
* j0(x)
* j1(x)
* jn(x,n)
* y0(x)
* y1(x)
* yn(x,n)
* Ai(x)
* Bi(x)

LOCATION
AdvMath ==> Bessel ==>

SEE ALSO
Hyper Bessel.
END HELP
HELP beta(x,y)
An object used to calculate the beta function
of the input (x,y).

USE
Use beta(x,y) to calculate the beta function
on x.  The beta function is defined as the:

( gamma(x) * gamma(y) ) / gamma(x+y)

The x and y values must be positive.

The x input may be of any shape and size
and of the type Int32, Real, Coord, or
Waveform.  For x input of all types the same
output type is returned, except for Int32
which returns a Real type.  The second y
parameter must be of the same type or be able
to be converted to the same type as the x
input value.  If both of the inputs are
arrays, they must be of exactly the same
shape and size.

LOCATION
AdvMath ==> Probability ==> beta(x,y)

EXAMPLE
beta(3, 1) returns 0.333333333333333.

beta(8, 7) returns 4.16250416250416E-05.

beta(-1, 3) returns an error.

NOTES
If both of the inputs are mapped then the
mappings must be the same.  The return value
has the same mappings as the input if either
input is mapped.  If neither of the inputs is
mapped, then the output is unmapped.

SEE ALSO
comb(n,r), factorial(x), gamma(x), and
perm(n,r).
END HELP
HELP Bi(x)
An object used to calculate the B-Airy
fractional order Bessel function of the
second kind of x.

USE
Use Bi(x) to find the Fractional order Bessel
function B-Airy of the second kind of x.  The
x input may be of any size and shape and of
the type Int32, Real, Coord, or Waveform.
For x input of all types, the same output
type is returned, except for Int32 which
returns a Real type.  For Coord input types,
the operation is done on the dependent
variable.

LOCATION
AdvMath ==> Bessel ==> Bi(x)

EXAMPLE
Bi(1) returns 1.20742359495287.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

SEE ALSO
Ai(x), j0(x), j1(x), jn(x,n), y0(x), y1(x),
and yn(x,n).
END HELP
HELP binomial(a,b)
An object used to calculate the number of
combinations of a things taken b at a time.

USE
Use binomial(a,b) to calculate the number of
combinations of a things taken b at a time
using the formula:

binomial(a, b) = a!/((a-b)!  * b!)

The !  symbol means factorial.

The a input may be of any shape and size
and of the type Int32, Real, Coord, or
Waveform.  For a input of all types the same
output type is returned, except for Int32
which returns a Real type.  The second b
parameter must be of the same type or be able
to be converted to the same type as the a
input value.  If both of the inputs are
arrays, they must be of exactly the same
shape and size.

The binomial(a,b) operation is only
defined for integer operands so the input
numbers, while of unique type, are converted
to Int32 type before the calculation is done.

LOCATION
AdvMath ==> Probability ==> binomial(a, b)

EXAMPLE
binomial(10,3) will return as given by the
formula:

10!/((10-3)!*3!)  = 10!/(7!*3!)
=(10*9*8)/(3*2*1) = 120.

binomial(10.4,3.9) will return as given by
the formula:

10!/((10-3)!*3!)  = 10!/(7!*3!)  =
(10*9*8)/(3*2*1) = 120.

The rule about converting Real to Int32
forces 10.4 to 10 and 3.9 to 3.

NOTES
a and b must both be positive and a must be
greater than b.

This function is identical to comb(n,r).

If both of the inputs are mapped then the
mappings must be the same.  The return value
has the same mappings as the input if either
input is mapped.  If neither of the inputs is
mapped, then the output is unmapped.

SEE ALSO
beta(x,y), comb(n,r), factorial(n), gamma(x),
and perm(n,r).
END HELP
HELP bit(x,n)
An object that returns the binary value in a
particular bit position.

USE
Use bit(x,n) to return the bit value in the
nth position of x.  x can be any shape and of
type Int32, Real, Coord, or Waveform.  If x
is not of type Int32, it is converted to
Int32, retaining shape.  The return type is
the same as x with a value of zero or one.  n
must be a container that is, or can be
converted to, Int32 and has a value between 0
and 31 inclusive.  n must be either scalar or
match the shape of x.

LOCATION
Math ==> Bitwise ==> bit(x,n)

EXAMPLE
bit(9,0) returns 1 because the binary value
of 9 is 1001 and the 0 bit is set.

NOTES
The return value has the same mappings as x.
Mappings on n are ignored.

SEE ALSO
bits(str), Bitwise, clearBit(x,n), and
setBit(x,n).
END HELP
HELP bitAnd(x,y)
An object that returns the Bitwise AND of x
and y.

USE
Use bitAnd(x,y) to perform a binary AND on
two containers.  x and y can be any shape.
But if both are arrays, the shape and sizes
must match.  x and y may be of types Int32,
Real, Coord, or Waveform.  Both x and y are
converted to Int32 before doing the bitAnd.
The return value is of type Int32.

LOCATION
Math ==> Bitwise ==> bitAnd(x,y)

EXAMPLE
bitAnd(5, [3 12]) returns [1 4].

NOTES
If any of the input parameters are mapped,
then those mappings must be the same.  The
resultant container retains the mappings of
the input container.  If only one of the
inputs is mapped, the resultant container has
those mappings.

SEE ALSO
AND, bit(x,n), bitCmpl(x), bitOr(x,y),
Bitwise, bitXor(x,y), NOT, OR, and XOR.
END HELP
HELP bitCmpl(x)
An object that returns the Bitwise 1's
complement of x.

USE
Use bitCmpl(x) to perform a binary 1's
complement on a container.  x may be any
shape and of the type Int32, Real, Coord, or
Waveform.  x is converted to Int32 before the
operation and the result is converted back to
x's original type.

LOCATION
Math ==> Bitwise ==> bitCmpl(x)

EXAMPLE
bitCmpl(7) returns -8.

NOTES
Mappings are retained in the result.

SEE ALSO
AND, bit(x,n), bitAnd(x,y), bitOr(x,y),
Bitwise, bitXor(x,y), NOT, OR, and XOR.
END HELP
HELP bitOr(x,y)
An object that returns the Bitwise OR of x
and y.

USE
Use bitOr(x,y) to perform a binary OR on two
containers.  x and y can be any shape.  But
if both are arrays, the shapes and sizes must
match.  x and y may be of types Int32, Real,
Coord, or Waveform.  Both x and y are
converted to Int32 before the bitOr.  The
return value is of type Int32.

LOCATION
Math ==> Bitwise ==> bitOr(x,y)

EXAMPLE
bitOr(5, [3 12]) returns [7 13].

NOTES
If any of the input parameters are mapped,
then those mappings must be the same.  The
resultant container retains the mappings of
the input container.  If only one of the
inputs is mapped, the resultant container has
those mappings.

SEE ALSO
AND, bit(x,n), bitAnd(x,y), bitCmpl(x),
Bitwise, bitXor(x,y), NOT, OR, and XOR.
END HELP
HELP bits(str)
An object that returns the binary value of a
string of 0s and 1s.

USE
Use bits(str) to return an Int32 with the
value of the digits in the Text str,
converted to Int32 as base 2.  str must be a
Text or Enum container of any shape.  (Enum
is converted to Text.)  str may only contain
leading white space, then 0s and 1s to form a
binary number.

LOCATION
Math ==> Bitwise ==> bits(str)

EXAMPLE
bits("011") returns 3.

NOTES
The return value has the same mappings as the
input container.  The least significant bit
is on the right, and the most significant bit
is on the left.

SEE ALSO
bit(x,n), Bitwise, clearBit(x,n), and
setBit(x,n).
END HELP
HELP bitShift(x,y)
An object that returns x with the bits
shifted left or right n places.

USE
Use bitShift(x,y) to shift the bits of
container x by y places.  x may be any shape
and of the types Int32, Real, Coord, or
Waveform.  x is converted to Int32 before the
operation and the result is converted back to
x's original type.  y must be a container
which is or can be converted to Int32.  If y
is negative, the bits are shifted right;
otherwise the bits are shifted left.  y must
be either scalar or match the shape of x.  If
y is greater than 31 or less than -31, the
return value will be zero.

LOCATION
Math ==> Bitwise ==> bitShift(x,y)

EXAMPLE
bitShift([1 7 7], [3 2 (-2)]) returns 
[8 28 1].

bitShift(8,2) returns 32.

bitShift(8,-2) returns 2.

NOTES
Mappings are retained in the result.

SEE ALSO
bit(x,n), bitAnd(x,y), bitOr(x,y), Bitwise,
bitXor(x,y), clearBit(x,n),
rotate(x,numElem), and setBit(x,n).
END HELP
HELP Bitwise
A menu item.

USE
Use Bitwise to access the following objects
which set, clear, access, or shift bits in an
Int32, or perform binary AND, OR, and XORs on
Int32s.
* bit(x,n)
* bits(str)
* setBit(x,n)
* clearBit(x,n)
* bitAnd(x,y)
* bitOr(x,y)
* bitXor(x,y)
* bitCmpl(x)
* bitShift(x,y)

LOCATION
Math ==> Bitwise ==>

NOTES
The objects on the Bitwise menu make sense
only for the type Int32.  But for ease of
use, most of the objects accept and return
most types.  Note that internally most of
these objects convert the arguments to Int32
before performing the function, then convert
the result back to the original type.  This
means that the values of Reals, Coords, and
Waveforms are truncated inside the objects.

Bits are numbered from zero.

SEE ALSO
AND, NOT, OR, Relational, and XOR.
END HELP
HELP bitXor(x,y)
An object that returns the Bitwise XOR of x
and y.

USE
Use bitXor(x,y) to perform a binary XOR
(exclusive or) on two containers.  x and y
can be any shape.  But if both are arrays,
the shapes and sizes must match.  x and y may
be of the type Int32, Real, Coord, or
Waveform.  Both x and y are converted to
Int32 before the bitXor().  The return value
is of type Int32.

LOCATION
Math ==> Bitwise ==> bitXor(x,y)

EXAMPLE
bitXor(5, [3 12]) returns [6 9].

NOTES
If any of the input parameters are mapped,
then those mappings must be the same.  The
resultant container retains the mappings of
the input container.  If only one of the
inputs is mapped, the resultant container has
those mappings.

SEE ALSO
AND, bit(x,n), bitAnd(x,y), bitCmpl(x),
bitOr(x,y), Bitwise, NOT, OR, and XOR.
END HELP
HELP blackman(x)
An object used to apply a Blackman window to
a time series of values.

USE
Use blackman(x) to filter the values in x in
the same manner as convolving x with the
spectral transform of the Blackman function.
This has the effect of suppressing some of
the noise due to the tails of the input
sequence and the potential discontinuities
they represent when sampling periodic
signals.

The input x must be an Array 1D of type
Int32, Real, Coord, or a Waveform, or a
Spectrum.  The same type is returned, except
for Int32, which returns Real.

If x is a Spectrum, it is first converted
to a Waveform using an ifft(x) before the
window is applied.  The result of the window
is then converted back to type Spectrum using
an fft(x).  A Spectrum is returned.

LOCATION
AdvMath ==> Signal Processing ==> blackman(x)

EXAMPLE
blackman([1 1 1 1 1 1 1 1]) returns [0.014
0.172 0.555 0.938 0.938 0.555 0.172 0.014].

NOTES
The Blackman function is represented in the
time domain as:

0.42 - 0.5*cos(2*PI*(n+0.5)/N) +
0.08*cos(4*PI*(n+0.5)/N),

where n is the position (index) in the
array, and N is the size of the array.  The
result will be an array of the same type as x
and will have the same mappings as x (if
any).

For a discussion of sidelobe levels and
coherent gains, see:

Ziemer, Tranter, and Fannin, "Signals and
Systems", Macmillan Publishing, New York, NY,
1983.  ISBN #0-02-431650-4.

SEE ALSO
bartlet(x), convolve(a,b), fft(x),
hamming(x), hanning(x), ifft(x), and rect(x).
END HELP
HELP Calculus
A menu item.

USE
Use Calculus to take the integral or the
derivative of a one-dimensional array of
simple numeric values (Int, Real, 
Waveform, ...)  or lists of two-dimensional 
(two field) coordinates.
* integral(x)
* deriv(x,1)
* deriv(x,2)
* deriv(x,order)
* defIntegral(x,a,b)
* derivAt(x,1,pt)
* derivAt(x,2,pt)
* derivAt(x,order,pt)

LOCATION
AdvMath ==> Calculus ==>

NOTES
The integral and derivative functions are
applicable to one-dimensional arrays of
simple numeric values (Int, Real, Waveform,
and so forth) and lists of two-dimensional
(two field) coordinates which represent
equally spaced ordered data.  For unmapped
arrays, it is assumed that the data is
equally spaced and ordered, and a value of 1
is assumed for the interval dx between
points.  For mapped arrays, the operation is
performed with the interval value dx equal to
(Xmax-Xmin)/N and is thus automatically
scaled appropriately.  For a coordinate list,
the independent (first field) values are
first checked to be sure that they are
ordered and equally spaced, then the
operation is performed on the dependent
(second field) values using the previously
determined spacing as the value for dx.

If an unmapped array is used, but it is
known otherwise that the interval between
points is some value dx, then the correct
value for the operation can still be
obtained.  For the integral, multiply the
result by the known dx value.  For the
derivative, divide the result by the known dx
value.
END HELP
HELP ceil(x)
An object that returns the rounded-up value
of x to the nearest integer of a container.

USE
x may be any shape and of the types Int32,
Real, Coord, or Waveform.  The ceil(x)
function returns the smallest integer (as the
same type) greater than or equal to x; that
is, the value of x rounded to the next larger
integer, the nearest integer towards positive
infinity.

LOCATION
Math ==> Real Parts ==> ceil(x)

EXAMPLE
ceil([23.0 23.1 23.9 23.5 (-23.5)]) returns
[23 24 24 24 -23].

NOTES
Mappings are retained in the result.

SEE ALSO
abs(x), Complex Parts, floor(x), fracPart(x),
intPart(x), Real Parts, and round(x).
END HELP
HELP clearBit(x,n)
An object that returns x with the nth bit set
to 0.

USE
Use clearBit(x,n) to set a particular binary
digit of a container x to 0.  x can be any
shape and of types Int32, Real, Coord, or
Waveform.  If x is not of type Int32, it is
converted to Int32, retaining shape.  The
return value is of type Int32.  n must be a
container which is, or can be converted to,
Int32 and has a value between 0 and 31
inclusive.  n must be either scalar or match
the shape of x.

LOCATION
Math ==> Bitwise ==> clearBit(x,n)

EXAMPLE
clearBit(7,1) returns 5 because the binary
value of 7 is 111, and the first bit is
cleared yielding 101 (decimal 5).  (Bit
numbering starts with 0.)

NOTES
The mappings of the resultant container are
the same as the x parameter.

SEE ALSO
bit(str), bits(x,n), Bitwise, and
setBit(x,n).
END HELP
HELP clipLower(x,a)
An object used to clip the input data x to a
certain minimum value a.

USE
Use clipLower(x,a) to clip the data to a
minimum value a, that is, any data that is
less than a will be changed to a.

The x input may be of any size and shape
and of the type Int32, Real, Coord, Waveform,
or Text.  For x input of all types, the same
output type is returned.  The clip parameter
a must be of the same type, or be able to be
converted to the same type, as the x input
value and must either be Scalar in shape or
the same shape and size as x.  If one of the
inputs is Scalar and one of the inputs is
non-Scalar, the Scalar input is treated as if
it were an array of the same shape and size
as the non-Scalar input.

LOCATION
AdvMath ==> Data Filtering ==> clipLower(x,a)

EXAMPLE
Using the clipLower(x,.5) function on data,
where x is the array [.1, .4, .6, .9],
returns [.5, .5, .6, .9].

Using clipLower([.1, .4, .6, .9],[.2, .2,
.7, .7]) returns [.2, .4, .7, .9].

You can use clipLower to clip the values
of a Waveform to an arbitrary lower limit.
Use an array of Coords to define the limiting
points on the waveform.  The limiting points
are the endpoints of line segments that
define the limiting waveform shape.  There
might be just a few of these points.  Send
the Coord array through the Build Arb
Waveform object to create a lower limit
waveform with the same number of points as
your actual waveform.  Send that new waveform
into a clipLower function as the a input.
When the clipLower(x,a) is done, the input
waveform x will have all values below the
lower limit clipped to the minimum allowed by
the a input.

NOTES
If both of the inputs are mapped, then the
mappings must be the same.  The return value
has the same mappings as the input if either
input is mapped.  If neither of the inputs is
mapped, then the output is unmapped.

SEE ALSO
clipUpper(x,a).

Build Arb Waveform and Comparator 
(from "Help On Features" dialog box).
END HELP
HELP clipUpper(x,a)
An object used to clip the input data x to a
certain maximum value a.

USE
Use clipUpper(x,a) to clip the data to a
maximum value a.  That is, any data that is
greater than a will be changed to a.

The x input may be of any size and shape
and of the type Int32, Real, Coord, Waveform,
or Text.  For x input of all types, the same
output type is returned.  The clip parameter
a must be of the same type, or be able to be
converted to the same type, as the x input
value and must either be Scalar in shape or
the same shape and size as x.  If one of the
inputs is Scalar and one of the inputs is
non-Scalar, the Scalar input is treated as if
it were an array of the same shape and size
as the non-Scalar input.

LOCATION
AdvMath ==> Data Filtering ==> clipUpper(x,a)

EXAMPLE
Using the clipUpper(x,.5) function on data,
where x is the array [.1, .4, .6, .9],
returns [.1, .4, .5, .5].

Using clipUpper([.1, .4, .6, .9],[.2, .2,
.5, .5]) returns [.1, .2, .5, .5].

You can use clipUpper to clip the values
of a waveform to an arbitrary upper limit.
Use an array of Coords to define the limiting
points on the waveform.  The limiting points
are the endpoints of line segments that
define the limiting waveform shape.  Send the
Coord array through the Build Arb Waveform
object to create an upper limit waveform with
the same amount of points as your actual
waveform.  Send that new waveform into a
clipUpper function as the a input.  When the
clipUpper(x,a) is done, the input waveform x
will have all values above the upper limit
clipped to the maximum allowed by the a
input.

NOTES
If both of the inputs are mapped then the
mappings must be the same.  The return value
has the same mappings as the input if either
input is mapped.  If neither of the inputs is
mapped, then the output is unmapped.

SEE ALSO
clipLower(x,a).

Build Arb Waveform and Comparator 
(from "Help On Features" dialog box).
END HELP
HELP cofactor(x,row,col)
An object used to calculate the cofactor of
the input matrix x, at row r and column c.

USE
Use cofactor(x,row,col) to calculate the
cofactor of the square matrix x.  The
cofactor of a matrix is defined as the
determinant of the submatrix of the input
matrix x obtained by deleting the rth row and
cth column, times (-1) raised to the (r+c)
power.

The x input must be a square matrix shape
and of the type Int32, Real, Complex or
PComplex.  For x input of all types the same
output type is returned and is Scalar in
shape, except for Int32 which returns a Real.
The input for the row and column to delete, r
and c, must be an Int32 Scalar or be able to
be converted to Int32 type.

A square matrix has the same number of
rows as columns.

LOCATION
AdvMath ==> Matrix ==> cofactor(x,row,col)

EXAMPLE
cofactor(a,1,2), where a is a matrix 
[ [3 -1 2] [4 5 6] [7 1 2] ], returns 34.

NOTES
Mappings on the operand are ignored.

The r and c inputs are expected to be of
Int32 type or be able to be converted to that
type.  The rows and columns of the matrix are
numbered from 0 to n-1.  Therefore, be
careful when specifying which row and column
to use.

SEE ALSO
det(x)and minor(x,row,col).
END HELP
HELP comb(n,r)
An object used to calculate the number of
combinations of n things taken r at a time.

USE
Use comb(n,r) to calculate the number of
combinations of n things taken r at a time
using the formula:

comb(n, r) = n!/((n -r)!  * r!)

The !  symbol means factorial.

The n input may be of any shape and size
and of the type Int32, Real, Coord, or
Waveform.  For n input of all types the same
output type is returned, except for Int32
which returns a Real type.  The second r
parameter must be of the same type or be able
to be converted to the same type as the n
input value.  If both of the inputs are
arrays, they must be of exactly the same
shape and size.

The comb(n, r) operation is only defined
for integer operands so the input numbers,
while of unique type, are converted to Int32
type before the calculation is done.

LOCATION
AdvMath ==> Probability ==> comb(n, r)

EXAMPLE
comb(10,3) will return 120 as given by the
formula:

10!/((10-3)!*3!)  = 10!/(7!*3!)  =
(10*9*8)/(3*2*1) = 120.

comb(10.4,3.9) will return 120 as given by
the formula:

10!/((10-3)!*3!)  = 10!/(7!*3!)  =
(10*9*8)/(3*2*1) = 120.

The rule about converting Real to Int32
forces 10.4 to 10 and 3.9 to 3.

NOTES
Both n and r must be positive and n must be
greater than r.

If both of the inputs are mapped, then the
mappings must be the same.  The return value
has the same mappings as the input if either
input is mapped.  If neither of the inputs is
mapped, then the output is unmapped.

This function is identical to
binomial(a,b).

SEE ALSO
beta(x,y), binomial(a,b), factorial(n),
gamma(x), and perm(n,r).
END HELP
HELP Complex Parts
A menu item.

USE
Use Complex Parts to access the following
objects which return different parts of
Complex and PComplex containers.
* j(x)
* re(x)
* im(x)
* mag(x)
* phase(x)
* conj(x)

LOCATION
Math ==> Complex Parts ==>

NOTES
The objects on the Complex Parts menu make
sense only for the type Complex and PComplex.
But for ease of use, most of the objects
accept and return most types.

SEE ALSO
Real Parts.

Build Complex, Build PComplex, Complex,
UnBuild Complex,
and UnBuild PComplex in Help ==> On
Features.
END HELP
HELP concat(x,y)
An object used to concatenate containers.

USE
Use concat(x,y) to concatenate two
containers.  The input parameters can be of
any type and any shape.  The concat(x,y)
function will flatten arrays that are greater
than one dimension into an Array 1D.  The
resulting 1D arrays are then concatenated
together.  For x and y input of all types, a
1D container of the highest type is returned.

LOCATION
AdvMath ==> Array ==> concat(x,y)

EXAMPLE
If x is a Real Scalar container with 3 in it,
and y is a Text array container with ["This"
"is" "a" "test"] in it, then concat(x,y) will
return a Text array container ["3" "This"
"is" "a" "test"].  In this case, the numeric
3 has been converted to the higher type Text
string "3" before the concat operation.

NOTES
If the x value is mapped, the y value may be
either mapped with the same point spacing, or
unmapped.  The result will be mapped from
Xmin to Xmin+dx*N, where Xmin is the minimum 
value of the x mapping, dx is the distance 
between two consecutive points in x, and N 
is the size of the resultant array.

Note the difference between the
concat(x,y) and sum(x) functions on Text
inputs.  The concat(x,y) creates an Array 1D
in all cases.  The sum(x) function will
simply link all the text strings together to
form one large output string.  That is,
concat(x,y), where x is the Scalar Text value
"a" and y is the Scalar Text input "b",
yields the Array 1D ["a","b"].  On the other
hand, sum(["a","b"]) will return the Scalar
container with the text value of "ab" in it.

All nil inputs are automatically converted
to Real scalars with the value 0.  Thus,
where x is nil and y is an Int32 scalar value
5, concat(x,y) results in the Array 1D two
long of Real with values [0 5].  In contrast,
the Concatenator object with two inputs with
nil and an Int32 scalar value 5 will output
an Int32 array one long with value [5].

SEE ALSO
sum(x).

Concatenator (from "Help On Features" 
dialog box).
END HELP
HELP conj(x)
An object that returns the complex conjugate
of a Complex number x.

USE
Use conj(x) to generate the complex conjugate
of a Complex number x.  x can be any shape
and of type Complex, PComplex, or Spectrum.
The complex conjugate of a Complex number
simply reverses the sign of the imaginary
component.  The complex conjugate of a
PComplex number simply reverses the sign of
the phase.

LOCATION
Math ==> Complex Parts ==> conj(x)

EXAMPLE
conj( (2, 3) ) returns (2, -3).

conj( (8, @45) ) returns (8, @-45) with
Trig Mode set to Degrees.

NOTES
Mappings are retained in the result.

SEE ALSO
im(x), j(x), mag(x), phase(x), re(x), and
Real Parts.

Build Complex, Trig Mode, and UnBuild
Complex (from "Help On Features" 
dialog box). 
END HELP
HELP convolve(a,b)
An object used to convolve two arrays of
data.

USE
Use convolve(a,b) to calculate the discrete
aperiodic convolution of two 1D arrays a and
b.  The result will be an array of the same
type and of size (Na+Nb)-1, where Na is the
size of input array a, and Nb is the size of
input array b.

The input values a and b must be an Array
1D of type Int32, Real, Coord, or Waveform.
The return type is the same as the highest
type of the inputs, except Int32, which
returns Real.  a and b do not have to be the
same size.  The resultant values are not
normalized.

LOCATION
AdvMath ==> Signal Processing ==>
convolve(a,b)

EXAMPLE
convolve([1 2 3 4 5],[1 1 1]) returns 
[1 3 6 9 12 9 5].

NOTES
The inputs a and b must represent equally
spaced data.  In addition, the interval
between any two values of a must be the same
as that between any two values of b.  For two
unmapped arrays, it is assumed that the
interval is always 1.  For mapped arrays, the
interval is (Xmax-Xmin)/N, where Xmax and
Xmin are the mappings, and N is the size of
the array.  When one input is mapped and the
other is not, the unmapped input is assumed
to be sampled at the same frequency as the
mapped input.  The resultant values will
never be normalized to any scale factor.

SEE ALSO
fft(x)and xcorrelate(a,b).
END HELP
HELP cos(x)
An object that returns the cosine of x.

USE
Use cos(x) to generate the cosine of the x
data.  x can be any shape and of type Int32,
Real, Coord, Waveform, Complex, PComplex, or
Spectrum.  x is assumed to be in the current
Trig Mode units.  Int32 returns a Real; all
others will return the same type.  All will
return the same shape as x.

LOCATION
Math ==> Trig ==> cos(x)

EXAMPLE
cos([0 180]) returns [1 -1] with Trig Mode
set to Degrees.

cos((1, PI/4)) returns (0.715684,
-0.73096) with Trig Mode set to Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
acos(x), cosh(x), sin(x), tan(x), and Trig.

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP cosh(x)
An object that returns the hyperbolic cosine
of x.

USE
Use cosh(x) to generate the hyperbolic cosine
of the x data.  x can be any shape and of
type Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  x is assumed to be in
the current Trig Mode units.  Int32 returns a
Real; all others will return the same type.
All will return the same shape as x.

LOCATION
Math ==> Hyper Trig ==> cosh(x)

EXAMPLE
cosh(0) returns 1 with Trig Mode set to
Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
acosh(x), cos(x), Hyper Trig, sinh(x), and
tanh(x).

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP cot(x)
An object that returns the cotangent of x.

USE
Use cot(x) to generate the cotangent of the x
data.  x can be any shape and of type Int32,
Real, Coord, Waveform, Complex, PComplex, or
Spectrum.  x is assumed to be in the current
Trig Mode units.  Int32 returns a Real; all
others will return the same type.  All will
return the same shape as x.

LOCATION
Math ==> Trig ==> cot(x)

EXAMPLE
cot([45 90]) returns [1 61E-18] with Trig
Mode set to Degrees.  Note that the second
number, which should be zero, is smaller than
the system precision.

cot((3, @PI/2)) returns (1.0049698,
@-1.57079) with Trig Mode set to Radians.

cot((3, @90)) returns (1.0049698, @-90)
with Trig Mode set to Degrees.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
acot(x), atan2(y,x), cos(x), coth(x), sin(x),
tan(x), and Trig.

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP coth(x)
An object that returns the hyperbolic
cotangent of x.

USE
Use coth(x) to generate the hyperbolic
cotangent of the x data.  x can be any shape
and of type Int32, Real, Coord, Waveform,
Complex, PComplex, or Spectrum.  x is assumed
to be in the current Trig Mode units.  Int32
returns a Real; all others will return the
same type.  All will return the same shape as
x.

LOCATION
Math ==> Hyper Trig ==> coth(x)

EXAMPLE
coth(0.4) returns 2.631 with Trig Mode set to
Radians, essentially, positive infinity.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
acoth(x), cot(x), Hyper Trig, sinh(x), and
tanh(x).

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP cubert(x)
An object that returns the cube root of the
value of x.

USE
Use cubert(x) to generate the cube root of a
number x.  x can be any shape and of type
Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  For PComplex, the
cubert(x) is defined as the cube root of the
magnitude and one third the phase.  Complex
is converted to PComplex before the function
is applied.  Int32 arguments will return a
Real; all others will return the same type.
All will return the same shape as x.

LOCATION
Math ==> Power ==> cubert(x)

EXAMPLE
cubert( (8, @90) ) will return (2, @30).

cubert( (1,1) ) will return (1.08, 0.291).

NOTES
Mappings are retained in the result.

SEE ALSO
^ (exponent), Power, sq(x), and sqrt(x).
END HELP
HELP Data Filtering
A menu item.

USE
Use Data Filtering to apply filtering
algorithms to the data to smooth it.
* polySmooth(x)
* meanSmooth(x,numPts)
* movingAvg(x,numPts)
* clipUpper(x,a)
* clipLower(x,a)
* minIndex(x)
* maxIndex(x)
* minX(x)
* maxX(x)

LOCATION
AdvMath ==> Data Filtering ==>

SEE ALSO
Regression and Signal Processing.
END HELP
HELP defIntegral(x,a,b)
An object used to calculate the integral of
those values of the input data which are
between points a and b (inclusive) using
Simpson's 1/3 rule.

USE
Use defIntegral(x,a,b) to calculate the
numerical approximation of the integral of a
set of ordered, equally-spaced values (x)
between points a and b.  The result is a
scalar value of type Real.

LOCATION
AdvMath ==> Calculus ==> defIntegral(x,a,b)

EXAMPLE
defIntegral([ 0 1 2 3 4 4 3 2 1 0 ], 2, 5)
returns 10.12.

NOTES
The defIntegral(x,a,b) function is applicable
to one-dimensional arrays of simple numeric
values (Int32, Real, Waveform) and lists of
two-dimensional (two field) coordinates which
represent equally spaced ordered data.  For
unmapped arrays, the values a and b represent
indices in the array (0 to N-1).  For
coordinate lists, the values a and b
represent real values between the x-values of
the first and last point in the coordinate
list (inclusive).  For mapped arrays, the
values a and b represent real values between
the Xmin mapping and Xmax-dx (inclusive),
where dx is the interval between consecutive
points:  (Xmax-Xmin)/N.

For unmapped arrays, it is assumed that
the data is equally spaced and ordered, and a
value of 1 is assumed for the interval dx
between points.  For mapped arrays, the
operation is performed with the interval
value dx equal to (Xmax-Xmin)/N and is thus
automatically scaled appropriately.  For a
coordinate list, the independent (first
field) values are first checked to be sure
that they are ordered and equally spaced,
then the operation is performed on the
dependent (second field) values using the
previously determined spacing as the value
for dx.

If an unmapped array is used, but it is
known otherwise that the interval between
points is some value dx, then the correct
value for the operation can be obtained by
multiplying the result of defIntegral(x,a,b)
by the known dx value.

When the values represent noisy data, the
result of defIntegral(x) can often be
improved (in a pragmatic sense) by first
filtering or smoothing the data.  Smoothing
removes much of the unwanted noise which is
superimposed on the underlying values.  See
the polySmooth(x) function and related
smoothing functions for examples.

SEE ALSO
integral(x).
END HELP
HELP deriv(x,order)
An object used to calculate the derivative of
order order across all values of the input
data using a sliding fourth-order
(five-point) polynomial.

USE
Use deriv(x,order) to calculate the numerical
approximation of the derivative of order
order across all points of a set of ordered
equally spaced values (x).  The result is an
array of the same size and shape as the input
x.  The result is the same type as x except
for Int32.  Int32 returns a Real and has the
same mappings (if any) as the input x.

LOCATION
AdvMath ==> Calculus ==> deriv(x,order)

EXAMPLE
deriv([0 1 2 3 3 2 1 0], 1) returns [1.25
0.9167 1.083 0.5833 -0.5833 -1.083 -0.9167
-1.25].

NOTES
The deriv(x,order) function is applicable to
one-dimensional arrays of simple numeric
values (Int32, Real, Waveform) and lists of
two-dimensional (two field) coordinates that
represent equally spaced ordered data.  For
mapped arrays, the mappings of the resultant
array will be identical to those of x.  For
coordinate lists, the values a and b
represent real values between the x-values of
the first and last point in the coordinate
list (inclusive).  For mapped arrays, the
values a and b represent real values between
the Xmin mapping and Xmax-dx (inclusive),
where dx is the interval between consecutive
points:  (Xmax-Xmin)/N.

For unmapped arrays, it is assumed that
the data is equally spaced and ordered, and a
value of 1 is assumed for the interval dx
between points.  For mapped arrays, the
operation is performed with the interval
value dx equal to (Xmax-Xmin)/N and is thus
automatically scaled appropriately.  For a
coordinate list, the independent (first
field) values are first checked to be sure
that they are ordered and equally spaced,
then the operation is performed on the
dependent (second field) values using the
previously determined spacing as the value
for dx.

If an unmapped array is used, but it is
known otherwise that the interval between
points is some value dx, then the correct
value for the operation can be obtained by
dividing the result of deriv(x,order) by the
known dx value.

When the values represent noisy data, the
result of deriv(x,order) can often be
improved (in a pragmatic sense) by first
filtering or smoothing the data.  Smoothing
removes much of the unwanted noise which is
superimposed on the underlying values.  See
the polySmooth(x) function and related
smoothing functions for examples.

SEE ALSO
derivAt(x,order,pt).
END HELP
HELP derivAt(x,order,pt)
An object used to calculate the derivative of
order order at value pt of the input data
using a sliding fourth-order (five-point)
polynomial.

USE
Use derivAt(x,order,pt) to calculate the
numerical approximation of the derivative of
order order at some point pt in the set of
ordered equally spaced values (x).  The
result is a scalar value of type Real, except
for Coord, which returns Coord.

LOCATION
AdvMath ==> Calculus ==> derivAt(x,order,pt)

EXAMPLE
derivAt([ 0 1 2 3 3 2 1 0 ], 1, 3) returns
0.5833.

NOTES
The derivAt(x,order,pt) function is
applicable to one-dimensional arrays of
simple numeric values (Int32, Real, Waveform)
and lists of two-dimensional (two field)
coordinates that represent equally spaced
ordered data.  For unmapped arrays, the value
a represents an index in the array (0 to
N-1).  For coordinate lists, the values a and
b represent real values between the x-values
of the first and last point in the coordinate
list (inclusive).  For mapped arrays, the
values a and b represent real values between
the Xmin mapping and Xmax-dx (inclusive),
where dx is the interval between consecutive
points:  (Xmax-Xmin)/N.

For unmapped arrays, it is assumed that
the data is equally spaced and ordered, and a
value of 1 is assumed for the interval dx
between points.  For mapped arrays, the
operation is performed with the interval
value dx equal to (Xmax-Xmin)/N and is thus
automatically scaled appropriately.  For a
coordinate list, the independent (first
field) values are first checked to be sure
that they are ordered and equally spaced.
Then the operation is performed on the
dependent (second field) values using the
previously determined spacing as the value
for dx.

If an unmapped array is used, but it is
known otherwise that the interval between
points is some value dx, then the correct
value for the operation can be obtained by
dividing the result of derivAt(x,order,pt) by
the known dx value.

When the values represent noisy data, the
result of derivAt(x,order,pt) can often be
improved (in a pragmatic sense) by first
filtering or smoothing the data.  Smoothing
remove much of the unwanted noise which is
superimposed on the underlying values.  See
the polySmooth(x) function and related
smoothing functions for examples.

SEE ALSO
deriv(x,order).
END HELP
HELP det(x)
An object used to calculate the determinant
of a square matrix.

USE
Use det(x) to calculate the determinant of
the square matrix x.  The x input must be a
square matrix shape and of the type Int32,
Real, Complex or PComplex.  For x input of
all types, the same output type is returned
and is Scalar in shape, except Int32, which
returns a Real.  A square matrix has the same
number of rows as columns.

LOCATION
AdvMath ==> Matrix ==> det(x)

EXAMPLE
Where x is a square matrix [ [1 2] [3 4] ],
det(x) returns -2.

NOTES
Mappings on the operand are ignored.

SEE ALSO
identity(x), inverse(x), and transpose(x).
END HELP
HELP div (truncated division)
An object that performs an arithmetic div
(truncated division) on two operands.

USE
Use div to determine the number of times one
container divides evenly into another
container, that is, the truncated division
value.  The two containers may be of type
Int32, Real, Coord, or Waveform.  The two
containers may be of any shape.  But if one
of the containers is an array, the other must
be either a scalar or an array of the same
size and shape.  The result is a container of
the highest type, with the same shape as the
operands.

If both operands are of type Coord, they
must have their independent variable(s) match
exactly or an error is returned.  The div is
only performed on the dependent (last)
variable.

LOCATION

Math ==> + - * / ==> div

EXAMPLE
A scalar div an array:  3.2 DIV [1 2 3 4]
returns [3 1 1 0].

An array div a scalar:  [1 2 3] DIV 2
returns [0 1 1].

Two scalars:  12.95 DIV 4 returns 3.

Two Coord scalars:  coord(1,3) DIV
coord(1,5) returns coord(1,0).

Two Coord scalars:  coord(1,3) DIV
coord(2,5) returns an error.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Coord, or a mapped
array of any other type), the other container
must be unmapped or have identical mappings.
The return value will have the same mappings
as the operands; otherwise an error is
returned.

SEE ALSO
+ (add), / (divide), * (multiply), and -
(subtract).
END HELP
HELP / (divide)
An object that performs an arithmetic
division of two operands.

USE
Use / to divide the value of one container by
the value of another container.  The two
containers may be of type Int32, Real, Coord,
Waveform, Complex, PComplex, or Spectrum.
The two containers may be of any shape.  But
if one of the containers is an array, the
other must be either a scalar or an array of
the same size and shape.  The result is a
container of the highest type, with the same
shape as the operands.

If both operands are of type Coord, they
must have their independent variable(s) match
exactly or an error is returned.  The
division is only performed on the dependent
(last) variable.

This division operation performs a
parallel division on all arrays, including
matrices.  For a matrix divide, see the
function matDivide(numer,denom).

LOCATION

Math ==> + - * / ==> /

EXAMPLE
A scalar divided by an array:  3.0 / [1 2 3]
returns [3 1.5 1].

Two arrays:  [4 5 6] / [1 2 3] returns 
[4 2.5 2].

Two PComplex scalars:  (1,@90) / (2,@30)
returns (0.5, @60) with Trig Mode set to
Degrees.

Two Coord scalars:  coord(1,3) /
coord(1,5) returns coord(1,0.6).

Two Coord scalars:  coord(1,3) /
coord(2,5) returns an error.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Spectrum, Coord, or a
mapped array of any other type), the other
container must be unmapped or have identical
mappings.  The return value will have the
same mappings as the operands; otherwise an
error is returned.

SEE ALSO
+ (add), div (truncated division),
matDivide(numer,denom),

* (multiply), and - (subtract).
END HELP
HELP dmyToDate(d,m,y)
An object that returns the value of the
parameters d, m, and y converted to a date.

USE
Use dmyToDate(d,m,y) to convert three values,
day, month, and year, into the date.  d, m,
and y can be any shape.  If one of the
containers is an array, the other must be
either a scalar or an array of the same size
and shape.  The result is a container of the
highest type, with the same shape as the
operands.  d, m, and y can be of type Int32,
Real, Coord, or Waveform.  Int32 arguments
will return a Real; all others will return
the same type.  All will return the same
shape as x.

LOCATION
Math ==> Time & Date ==> dmyToDate(d,m,y)

EXAMPLE
dmyToDate(25, 12, 1991) returns 62.8293999G.

NOTES
If any of the input parameters are mapped,
then those mappings must be the same.  The
resultant container retains the mappings of
the input container.  If only one of the
inputs is mapped, the resultant container has
those mappings.

Also note that dmy is specified as modern
Gregorian dates.

SEE ALSO
hmsToHour(h,m,s), hmsToSec(h,m,s),
mday(aDate), month(aDate), now(), Time &
Date, wday(aDate), and year(aDate).
END HELP
HELP == (equal to)
An object that performs an "is equal to"
operation on two operands.

USE
Use == to determine whether the value(s) of
one container is equal to the value(s) of
another container.  The two containers may be
of any type and of any shape.  If one of the
containers is an array, the other must be
either a scalar or an array of the same size
and shape.  The result is a scalar Int32 with
the value 0 or 1.  If the first operand is
equal to the second, the value of the result
is 1; otherwise the value is 0.

If both operands are of type Coord, they
must have all their independent variable(s)
and dependent variables match exactly for the
the result to be 1.  If independent variables
do not match, an error is returned.  Complex,
PComplex, and Spectrum containers must have
both parts match for the operation to return
1.  Enums are converted to Text for the
comparison.

Arrays must have all the respective values
of both containers equal for the operation to
return 1.

LOCATION
Math ==> Relational ==> ==

EXAMPLE
A scalar and an array:  3.0 == [3 3 3]
returns 1.

A scalar and an array:  3.0 == [3 1 3]
returns 0.

Two arrays:  [1 2 3] == [1 2 4] returns 0.

Two PComplex scalars:  (1,@90) == (1,@85)
returns 0.

Two Complex scalars:  (2,3) == (2,4)
returns 0.

Two Complex scalars:  (2,3) == (2,3)
returns 1.

Two Coord scalars:  coord(1,3) ==
coord(1,5) returns 0.

Two Coord scalars:  coord(1,3) ==
coord(2,3) returns an error.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Spectrum, Coord, or a
mapped array of any other type), the other
container must be unmapped or have identical
mappings; otherwise an error is returned.

SEE ALSO
AND, > (greater than), >= (greater than or
equal to), < (less than), <= (less than or 
equal to), NOT != (not equal to), OR, 
Relational, and XOR.

Comparator, Conditional, and If/Then 
(from "Help On Features" dialog box).
END HELP
HELP erf(x)
An object used to calculate the error
function of the input x.

USE
Use erf(x) to calculate the error function of
x.  The erf function is defined as:

(2/SQRT(PI) ) * [ the integral of 
( e^(-t^2)) * dt ]

where the integral is evaluated over the
range from zero to x.

The x input may be of any shape and size
and of the type Int32, Real, Coord, or
Waveform.  For x input of all types the same
output type is returned, except for Int32
which returns a Real type.

LOCATION
AdvMath ==> Probability ==> erf(x)

EXAMPLE
erf(.5) returns 0.52049987781305.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

SEE ALSO
erfc(x).
END HELP
HELP erfc(x)
An object used to calculate the complementary
error function of the input x.

USE
Use erfc(x) to calculate the complementary
error function of x.  The erfc function is
defined as:

1-(2/SQRT(PI)) * [the integral of 
(e^(-t^2)) * dt]

where the integral is evaluated over the
range from zero to x.

The x input may be of any shape and size
and of the type Int32, Real, Coord, or
Waveform.  For x input of all types the same
output type is returned, except for Int32
which returns a Real type.

LOCATION
AdvMath ==> Probability ==> erfc(x)

EXAMPLE
erfc(.5) returns 0.47950012218695.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.
The erfc(x) function, which returns 1.0 -
erf(x), is provided because of the extreme
loss of relative accuracy if a large x is
called for in erf(x), the result is
subtracted from 1.0 (for example,
x=5, twelve places are lost).

SEE ALSO
erf(x).
END HELP
HELP exp(x)
An object that returns the exponential of the
value of x.

USE
Use exp(x) to generate the exponential, or
natural antilogarithm (base e), of a number
x; that is, e raised to the x power.  x can
be any shape and of type Int32, Real, Coord,
Waveform, Complex, PComplex, or Spectrum.
Int32 arguments will return a Real; all
others will return the same type.  All will
return the same shape as x.

LOCATION
Math ==> Power ==> exp(x)

EXAMPLE
exp(10) returns 22.0264657948k.

exp((1,2)) returns (-1.131204384,
2.471726672).

NOTES
Mappings are retained in the result.

SEE ALSO
exp10(x), ^ (exponent), log(x), log10(x), and
Power.
END HELP
HELP exp10(x)
An object that returns the exponential base
10 of the value of x.

USE
Use exp10(x) to generate the common
antilogarithm (base 10) of a number x; that
is, 10 raised to the x power.  x can be any
shape and of type Int32, Real, Coord,
Waveform, Complex, PComplex, or Spectrum.
Int32 arguments will return a Real; all
others will return the same type.  All will
return the same shape as x.

LOCATION
Math ==> Power ==> exp10(x)

EXAMPLE
exp10(10) returns 10G.

exp10((1, 2)) returns (-4.16146837,
9.09297427).

NOTES
Mappings are retained in the result.

SEE ALSO
exp(x), ^ (exponent), log(x), log10(x), and
Power.
END HELP
HELP ^ (exponent)
An object that performs an arithmetic
exponentiation of two operands.

USE
Use ^ to raise one number to the power of the
other number.  The two numbers may be of type
Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  The two containers
may be of any shape.  But if one of the
containers is an array, the other must be
either a scalar or an array of the same size
and shape.  The result is a container of the
highest type, with the same shape as the
operands.

If both operands are of type Coord, they
must have their independent variable(s) match
exactly or an error is returned.  The
exponentiation is only performed on the
dependent (last) variable.

LOCATION

Math ==> + - * / ==> ^

EXAMPLE
A scalar raised to an array:  3.0 ^ [1 2 3]
returns [3 9 27].

An array raised to a scalar:  [1 2 3] ^ 3
returns [1 8 27].

Two arrays:  [4 5 6] ^ [1 2 3] returns [4
25 216].

Two Complex scalars:  (2,3) ^ (4,5)
returns (-0.753046, -0.986429).

Two Coord scalars:  coord(4,3) ^
coord(4,2) returns coord(4,9).

Two Coord scalars:  coord(1,3) ^
coord(2,5) returns an error.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Spectrum, Coord, or a
mapped array of any other type), the other
container must be unmapped or have identical
mappings.  The return value will have the
same mappings as the operands; otherwise an
error is returned.

SEE ALSO
exp(x) and log(x).
END HELP
HELP exponential regression
An object used to fit an exponential curve to
(x,y) data.

USE
Use the exponential regression to fit the
data to the equation
y = C0 + exp(C1*x), where x is the x
coordinate and C0 and C1 are calculated
coefficients.  The exp function is the
transcendental
number e raised to the (C1*x) power.

The exponential regression object expects
an array of Coord type of input with one
independent variable, that is, an (x,y) pair.
If the input array is not a Coord type, an
attempt is made to convert it to Coord.  If
the input data is mapped (Waveform, Spectrum,
or a mapped array) then the conversion to
Coord uses the mapping information to create
the x part of the (x,y) pairs.  If the input
data is not mapped (for example, an array),
then the x part of the (x,y) pair is
implicitly generated from its position in the
array.

LOCATION
AdvMath ==> Regression ==> exponential

OPEN VIEW PARAMETERS
The Fit Type field on the open view is used
to change the regression type to linear,
logarithmic, exponential, power curve or
polynomial regression.  Clicking on the field
will bring up a list of the different
regression types.

EXAMPLE
See Regression for a Coord conversion
example.

NOTES
See Regression for general notes on
regression.

SEE ALSO
linear regression, logarithmic regression,
meanSmooth(x,numPts), movingAvg(x,numPts),
polynomial regression, polySmooth(x), and
power curve regression.

Build Coord (from "Help On Features" 
dialog box).
END HELP
HELP factorial(n)
An object used to calculate the factorial of
the input number n.

USE
Use factorial(n) to calculate the factorial
of the natural number n.  The factorial is
defined for any natural number n as
n!=(n) * (n-1) * (n-2) ... (3) * (2) * (1).

The n input may be of any shape and size
and of the type Int32, Real, Coord, or
Waveform.  For n input of all types the same
output type is returned, except for Int32
which returns a Real type.  The n input must
not be less than zero.

The factorial(n) operation is only defined
for integer operands so the input numbers,
while of unique type, are converted to Int32
type before the calculation is done.

LOCATION
AdvMath ==> Probability ==> factorial(n)

EXAMPLE
factorial(6) returns 720 from the
multiplication of 6*5*4*3*2*1.

factorial(6.7) returns 720 from the
multiplication of 6*5*4*3*2*1.  The rule
about converting Real to Int32 forces 6.7 to
6.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

SEE ALSO
beta(x,y), binomial(a,b), comb(n,r),
gamma(x), and perm(n,r).
END HELP
HELP fft(x)
An object to compute the Discrete Fourier
Transform on the input data.

USE
Use fft(x) to calculate the Discrete Fourier
Transform of the values in x.  The result is
a Complex array for Int and Real inputs, or a
Spectrum for a Waveform input, and represents
the positive half of the transformed values.
The size of the resultant array will be (N
DIV 2)+1, where N is the size of the input
array.

The input x must represent an array of
ordered, equally-spaced data.  For
non-Waveform inputs, the output will be an
unmapped array of Complex values.  For
Waveform inputs, the output will be mapped
from a minimum frequency of 0 to a maximum
frequency of (1+(N DIV 2))/(Tmax-Tmin), where
N is the size of the input array, and Tmin
and Tmax are the mappings of the input
Waveform.  Also note that the output will not
be normalized.

LOCATION
AdvMath ==> Signal Processing ==> fft(x)

EXAMPLE
fft([0 1 2 3 4 5 6 7]) returns [(3.5,0)
(-1,2.414) (-1,1) (-1,0.414) (-1,0)].

NOTES
1.  Truncation and Periodicity:  A basic
assumption in the use of the discrete Fourier
transform is that the given waveform h(t) is
periodic.  If this is not the case, then the
waveform must be truncated and represented as
a periodic function.  For a band-limited
periodic function h(t), the waveform must be
truncated at an integer multiple of the
period; otherwise, the resulting discrete and
continuous Fourier transform will differ
considerably in that sidelobes, frequency
leakage, and sharp discontinuities can
appear.  These difficulties are often reduced
through the use of windows.  If the waveform
is not band-limited, one generally must
adjust (increase) the truncation interval and
use windows [0,L] to reduce time-domain
truncation errors.  L is defined as the
period of the waveform.

2.  Aliasing:  The problem of aliasing
(frequency folding) occurs when the sampling
interval T is chosen too large.  One can
expect a degradation in the performance of
the discrete Fourier transform when the
sampling rate is close to the Nyquist
sampling rate.  If the waveform is not
periodic or not band-limited, increasing the
truncation interval[0,L] and decreasing the
sampling interval T can help to control
truncation errors and aliasing.

A reference on the fft can be found in the
book:

E.  Oran Brigham, "The Fast Fourier
Transform and Its Applications", Second
Edition, Prentice-Hall, Inc., Englewood
Cliffs, NJ, 1988.  ISBN #0-13-307505-2.

SEE ALSO
convolve(a,b) and ifft(x).
END HELP
HELP floor(x)
An object that returns the rounded-down value
of x to the nearest integer of a value.

USE
x may be any shape and of the types Int32,
Real, Coord, or Waveform.  The floor(x)
function returns the largest integer (as the
same type) less than or equal to x; that is,
the value of x rounded to the next smaller
integer, the integer nearest negative
infinity.

LOCATION
Math ==> Real Parts ==> floor(x)

EXAMPLE
floor([23.0 23.1 23.9 23.5 (-23.5)]) returns
[23 23 23 23 -24].

NOTES
Mappings are retained in the result.

SEE ALSO
abs(x), ceil(x), Complex Parts, fracPart(x),
intPart(x), Real Parts, and round(x).
END HELP
HELP fracPart(x)
An object that returns the value of the
fractional part of x.

USE
Use fracPart(x) to obtain the fractional part
of a container.  x may be any shape and of
the type Int32, Real, Coord, or Waveform.
The fracPart(x) function returns the
fractional part of x with the same sign.  It

returns x - intPart(x).

LOCATION
Math ==> Real Parts ==> fracPart(x)

EXAMPLE
fracPart([23.0 23.1 23.9 23.5 (-23.5)])
returns [0 0.1 0.9 0.5 -0.5].

NOTES
Mappings are retained in the result.

SEE ALSO
abs(x), ceil(x), Complex Parts, floor(x),
intPart(x), Real Parts, and round(x).
END HELP
HELP Freq Distribution
A menu item.

USE
Use Freq Distribution to calculate the
distribution of values over a range into a
fixed number of sub-ranges.
* magDist(x,from,thru,step)
* logMagDist(x,from,thru,logStep)

LOCATION
AdvMath ==> Freq Distribution ==>
END HELP
HELP gamma(x)
An object used to calculate the gamma
function of the input x.

USE
Use gamma(x) to calculate the gamma function
of x.  The gamma function is defined as:

(the integral of [ t^(x-1) * e^(-t) * dt ])

where the integral is evaluated over the
range from 0 to infinity.

The x input may be of any shape and size
and of the type Int32, Real, Coord, or
Waveform.  For x input of all types, the same
output type is returned, except for Int32
which returns a Real type.

LOCATION
AdvMath ==> Probability ==> gamma(x)

EXAMPLES
gamma(8) returns (8-1)!  = 5040.

gamma(-1) returns an error.

gamma(3.7) returns = 4.17065178379660.

gamma(-3.7) returns = 0.251643995902422.

NOTES
The gamma(x) function is not defined for
non-positive integral values of x.  When x is
a positive integer, gamma(x) is defined as
(x-1)!  (factorial).

Mappings on the operand are ignored and
the output container has the same mappings as
the input.

SEE ALSO
beta(x,y), comb(n,r), factorial(x), and
perm(n,r).
END HELP
HELP Generate
A menu item.

USE
Use Generate to access the following objects
which generate Real one-dimensional arrays of
data with specific values.
* ramp(numElem,from,thru)
* logRamp(numElem,from,thru)
* xramp(numElem,from,thru)
* xlogRamp(numElem,from,thru)

LOCATION
Math ==> Generate ==>
END HELP
HELP > (greater than)
An object that performs an "is greater
than" operation on two operands.

USE
Use > to determine whether the value(s) of
one container is greater than the value(s) of
another container.  The two containers may be
of type Int32, Real, Coord, Waveform, Text,
or Enum.  The two containers may be of any
shape.  But if one of the containers is an
array, the other must be either a scalar or
an array of the same size and shape.  The
result is a scalar Int32, with the value 0 or
1.  If the first operand is greater than the
second, the value of the result is 1;
otherwise the value is 0.

If both operands are of type Coord, their
independent variable(s) must be identical
before the operation is even attempted; if
not, an error is returned.  Enums are
converted to Text for the comparison.  Text
is compared using ASCII lexical ordering.

When two arrays are compared to each
other, each pair of elements must satisfy the
relational operator for the operation to
return 1.

LOCATION
Math ==> Relational ==> >

EXAMPLE
A scalar and an array:  3.0 > [1 3 9] returns
0.

An array and a scalar:  [5 9 7] > 4
returns 1.

Two arrays:  [3 4 7] > [2 3 5] returns 1.

Two arrays:  [3 4 3] > [2 3 5] returns 0.

Two Coord scalars:  coord(1,3) >
coord(1,5) returns 0.

Two Coord scalars:  coord(1,3) >
coord(2,5) returns an error.

Two Text scalars:  "too" > "zoo" returns
0.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Coord, or a mapped
array of any other type), the other container
must be unmapped or have identical mappings;
otherwise an error is returned.

SEE ALSO 
AND, == (equal to), >= (greater than or
equal to), < (less than), <= (less than or
equal to), NOT, != (not equal to), OR,
Relational, and XOR.

Comparator, Conditional, and If/Then 
(from "Help On Features" dialog box).
END HELP
HELP >= (greater than or equal to)
An object that performs an "is greater than
or equal to" operation on two operands.

USE
Use >= to determine whether the value(s) of
one container is greater than or equal to the
value(s) of another container.  The two
containers may be of type Int32, Real, Coord,
Waveform, Text, or Enum.  The two containers
may be of any shape.  But if one of the
containers is an array, the other must be
either be a scalar or an array of the same
size and shape.  The result is a scalar
Int32, with the value 0 or 1.  If the first
operand is greater than or equal to the
second, the value of the result is 1;
otherwise the value is 0.

If both operands are of type Coord, their
independent variable(s) must be identical
before the operation is even attempted; if
not, an error is returned.  Enums are
converted to Text for the comparison.  Text
is compared using ASCII lexical ordering.

When two arrays are mapped against each
other, each set of elements must satisfy the
relational operator for the operation to
return 1.

LOCATION
Math ==> Relational ==> >=

EXAMPLE
A scalar and an array:  3.0 >= [1 3 9]
returns 0.

An array and a scalar:  [4 5 6] >= 4
returns 1.

Two arrays:  [3 3 6] >= [2 3 5] returns 1.

Two arrays:  [1 4 3] >= [2 3 5] returns 0.

Two Coord scalars:  coord(1,3) >=
coord(1,5) returns 0.

Two Coord scalars:  coord(1,3) >=
coord(2,5) returns an error.

Two Text scalars:  "too" >= "zoo" returns
0.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Coord, or a mapped
array of any other type), the other container
must be unmapped or have identical mappings;
otherwise an error is returned.

SEE ALSO
AND, == (equal to), < (greater than), 
<= (greater than or equal to), > (less than),
NOT, != (not equal to), OR, Relational, 
and XOR.

Comparator, Conditional, and If/Then 
(from "Help On Features" dialog box).
END HELP
HELP hamming(x)
An object used to apply a Hamming window to a
time series of values.

USE
Use hamming(x) to filter the values in x in
the same manner as convolving x with the
spectral transform of the Hamming function.
This has the effect of suppressing some of
the noise due to the tails of the input
sequence and the potential discontinuities
they represent when sampling periodic
signals.

The input x must be an Array 1D of type
Int32, Real, Coord, or a Waveform, or a
Spectrum.  The same type is returned, except
for Int32, which returns Real.

If x is a Spectrum, it is first converted
to a Waveform using an ifft(x) before the
window is applied.  The result of the window
is then converted back to type Spectrum using
an fft(x).  A Spectrum is returned.

LOCATION
AdvMath ==> Signal Processing ==> hamming(x)

EXAMPLE
hamming([1 1 1 1 1 1 1 1]) returns [0.115
0.364 0.716 0.965 0.965 0.716 0.364 0.115].

NOTES
The Hamming function is represented in the
time domain as
0.54-0.46*cos(2*PI*(n+0.5)/N), where n is the
position (index) in the array, and N is the
size of the array.  The result will be an
array of the same type as x and will have the
same mappings as x (if any).

For a discussion of sidelobe levels and
coherent gains, see:

Ziemer, Tranter, and Fannin, "Signals and
Systems", Macmillan Publishing, New York, NY,
1983.  ISBN #0-02-431650-4.

SEE ALSO
bartlet(x), blackman(x), convolve(a,b),
fft(x), hanning(x), ifft(x), and rect(x).
END HELP
HELP hanning(x)
An object used to apply a Hanning window to a
time series of values.

USE
Use hanning(x) to filter the values in x in
the same manner as convolving x with the
spectral transform of the Hanning function.
This has the effect of suppressing some of
the noise due to the tails of the input
sequence and the potential discontinuities
they represent when sampling periodic
signals.

The input x must be an Array 1D of type
Int32, Real, Coord, or a Waveform, or a
Spectrum.  The same type is returned, except
for Int32, which returns Real.

If x is a Spectrum, it is first converted
to a Waveform using an ifft(x) before the
window is applied.  The result of the window
is then converted back to type Spectrum using
an fft(x).  A Spectrum is returned.

LOCATION
AdvMath ==> Signal Processing ==> hanning(x)

EXAMPLE
hanning([1 1 1 1 1 1 1 1]) returns [0.038
0.309 0.691 0.962 0.962 0.691 0.309 0.038].

NOTES
The Hanning function is represented in the
time domain as
0.5*(1-cos(2*PI*(n+0.5)/N)), where n is the
position (index) in the array, and N is the
size of the array.  The result will be an
array of the same type as x and will have the
same mappings as x (if any).

For a discussion of sidelobe levels and
coherent gains, see:

Ziemer, Tranter, and Fannin, "Signals and
Systems", Macmillan Publishing, New York, NY,
1983.  ISBN #0-02-431650-4.

SEE ALSO
bartlet(x), blackman(x), convolve(a,b),
fft(x), hamming(x), ifft(x), and rect(x).
END HELP
HELP hmsToHour(h,m,s)
An object that returns the value of the
parameters h, m, and s converted to hours.

USE
Use hmsToHour(h,m,s) to convert three values,
hours, minutes, and seconds, into hours.  h,
m, and s can be any shape.  If one of the
containers is an array, the others must be
either scalar or arrays of the same size and
shape.  The result is a container of the
highest type, with the same shape as the
operands.  h, m, and s can be of type Int32,
Real, Coord, or Waveform.  Int32 arguments
will return a Real; all others will return
the same type.  All will return the same
shape as x.

LOCATION
Math ==> Time & Date ==> hmsToHour(h,m,s)

EXAMPLE
hmsToHour(1, [0 12 60], 36) returns [1.01
1.21 2.01].

NOTES
If any of the input parameters are mapped,
then those mappings must be the same.  The
resultant container retains the mappings of
the input container.  If only one of the
inputs is mapped, the resultant container has
those mappings.

SEE ALSO
dmyToDate(d,m,y), hmsToSec(h,m,s),
mday(aDate), month(aDate), now(), Time &
Date, wday(aDate), and year(aDate).
END HELP
HELP hmsToSec(h,m,s)
An object that returns the value of the
parameters h, m, and s converted to seconds.

USE
Use hmsToSec(h,m,s) to convert three values,
hours, minutes, and seconds, into seconds.
h, m, and s can be any shape.  If one of the
containers is an array, the others must be
either scalar or arrays of the same size and
shape.  The result is a container of the
highest type, with the same shape as the
operands.  h, m, and s can be of type Int32,
Real, Coord, or Waveform.  Int32 arguments
will return a Real; all others will return
the same type.  All will return the same
shape as x.

Math ==> Time & Date ==> hmsToSec(h,m,s)

EXAMPLE
hmsToSec(1,[2 4 6],3) returns [3723, 3843,
3963].

NOTES
If any of the input parameters are mapped,
then those mappings must be the same.  The
resultant container retains the mappings of
the input container.  If only one of the
inputs is mapped, the resultant container has
those mappings.

SEE ALSO
dmyToDate(d,m,y), hmsToHour(h,m,s),
mday(aDate), month(aDate), now(), Time &
Date, wday(aDate), and year(aDate).
END HELP
HELP Hyper Bessel
A menu item.

USE
Use Hyper Bessel to calculate the modified
(hyperbolic) bessel function of the input
data.
* i0(x)
* i1(x)
* k0(x)
* k1(x)

LOCATION
AdvMath ==> Hyper Bessel ==>

SEE ALSO
Bessel.
END HELP
HELP Hyper Trig
A menu item.

USE
Use Hyper Trig to access the following
objects which perform hyperbolic
trigonometric functions on data.
* sinh(x)
* cosh(x)
* tanh(x)
* coth(x)
* asinh(x)
* acosh(x)
* atanh(x)
* acoth(x)

LOCATION
Math ==> Hyper Trig ==>

SEE ALSO
Trig.

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP i0(x)
An object used to calculate the modified
(hyperbolic) Bessel function of x of the
first kind of order zero.

USE
Use i0(x) to find the modified (hyperbolic)
Bessel function of x of the first kind of
order zero.  The x input may be of any size
and shape and of the type Int32, Real, Coord,
or Waveform.  For all x input types, the same
output type is returned, except for Int32
which returns a Real type.  For Coord input
types, the operation is done on the dependent
variable.

LOCATION
AdvMath ==> Hyper Bessel ==> i0(x)

EXAMPLE
i0(1) returns 1.26606587775200.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

SEE ALSO
i1(x), k0(x), and k1(x).
END HELP
HELP i1(x)
An object used to calculate the modified
(hyperbolic) Bessel function of x of the
first kind of order one.

USE
Use i1(x) to find the modified (hyperbolic)
Bessel function of x of the first kind of
order one.  The x input may be of any size
and shape and of the type Int32, Real, Coord,
or Waveform.  For all x input types, the same
output type is returned, except for Int32
which returns a Real type.  For Coord input
types, the operation is done on the dependent
variable.

LOCATION
AdvMath ==> Hyper Bessel ==> i1(x)

EXAMPLE
i1(1) returns 0.565159103992485.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

SEE ALSO
i0(x), k0(x), and k1(x).
END HELP
HELP identity(x)
An object used to return the identity matrix.

USE
Use identity(x) to return the identity matrix
that is the same size as the square input
matrix.  The x input must be a square matrix
and of the type Int32, Real, Complex or
PComplex.  For all x input types the same
output type is returned.  A square matrix has
the same number of rows as columns.

LOCATION
AdvMath ==> Matrix ==> identity(x)

EXAMPLE
Where x is a square matrix [ [1 2] [3 4] ],
identity(x) returns [ [1 0] [0 1] ].

Where x is the complex square matrix 
[ [(1,1) (2,2)] [(3,3) (4,4)] ], identity(x)
returns [ [(1,0) (0,0)] [(0,0) (1,0)] ].

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

SEE ALSO
det(x), inverse(x), and transpose(x).
END HELP
HELP ifft(x)
An object to compute the Inverse Discrete
Fourier Transform on the input data.

USE
Use ifft(x) to calculate the Inverse Discrete
Fourier Transform of the values in x.  The
input x should be the positive half of a
symmetric Complex, PComplex, or Spectral
sequence.  The result is a Real array for
Complex or PComplex inputs, or a Waveform,
for a Spectrum input.
The size of the resultant array will be
2*(N-1), where N is the size of the input
array (which should be an odd-count
sequence).

For non-Spectrum inputs, the output will
be an unmapped array of Real values.  For
Spectrum inputs, the mapping must be linear
(not log), and Fmin must be 0.  The output
will be mapped from a minimum time of 0 to a
maximum time of N/(Fmax-Fmin), where N is the
size of the input array, and Fmin and Fmax
are the mappings of the input Spectrum.  Also
note that the output will not be normalized.

It is assumed that the values of x
represent data that has not been normalized.

LOCATION
AdvMath ==> Signal Processing ==> ifft(x)

EXAMPLE
ifft([(3.5,0) (-1,2.414) (-1,1) (-1,0.414)
(-1,0)]) returns [0 1 2 3 4 5 6 7].

NOTES
1.  Truncation and Periodicity:  A basic
assumption in the use of the discrete Fourier
transform is that the given waveform h(t) is
periodic.  If this is not the case, then the
waveform must be truncated and represented as
a periodic function.  For a band-limited
periodic function h(t), the waveform must be
truncated at an integer multiple of the
period; otherwise, the resulting discrete and
continuous Fourier transform will differ
considerably since sidelobes, frequency
leakage, and sharp discontinuities can
appear.  These difficulties are often reduced
through the use of windows.  If the waveform
is not band-limited, you generally must
increase the truncation interval and use
windows [0,L] to reduce time-domain
truncation errors.  L is defined as the
period of the waveform.

2.  Aliasing:  The problem of aliasing
(frequency folding) occurs when the sampling
interval T is chosen too large.  One can
expect a degradation in the performance of
the discrete Fourier transform when the
sampling rate is close to the Nyquist
sampling rate.  If the waveform is not
periodic or not band-limited, increasing the
truncation interval [0,L] and decreasing the
sampling interval T can help to control
truncation errors and aliasing.

A reference on the ifft can be found in
the book:

E.  Oran Brigham, "The Fast Fourier
Transform and Its Applications", Second
Edition, Prentice-Hall, Inc., Englewood
Cliffs, NJ, 1988.  ISBN #0-13-307505-2.

SEE ALSO
fft(x).
END HELP
HELP im(x)
An object that returns the imaginary part of
a Complex number x.

USE
Use im(x) to extract the imaginary part of a
Complex number x.  x can be any shape and of
types Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  For types Int32,
Real, Coord, and Waveform, the same type with
value(s) of zero is returned.  For types
Complex, PComplex, and Spectrum, im(x)
returns a Real container with the value of
the imaginary part of the Complex number.
(PComplex is first converted to Complex.)

LOCATION
Math ==> Complex Parts ==> im(x)

EXAMPLE
im( (1,2) ) returns 2.

im( (1,@90) ), with Trig Mode in Degrees,
returns 1.

NOTES
Mappings are retained in the result.

SEE ALSO
conj(x), j(x), mag(x), phase(x), re(x), and
Real Parts.

Build Complex and UnBuild Complex 
(from "Help On Features" dialog box).

END HELP
HELP init(x,val)
An object used to initialize an array to a
specific value.

USE
Use init(x,val) to initialize an input array
x to a value of val.  The x input may be of
any size and shape and of the type Int32,
Real, Coord, Waveform, Complex, PComplex,
Spectrum, or Text.  For all x input types,
the same output type is returned.  The second
val parameter must be of the same type or be
able to be converted to the same type as the
x input value.

If the input x is an array then the val
init value parameter can be a Scalar value or
an array.  If val is an array, it must have
the same number of dimensions and size as the
x input.  That is, if x is an Array 1D then
val can either be a Scalar or an Array 1D of
the same size.

LOCATION
AdvMath ==> Array ==> init(x,val)

EXAMPLE
init(a,5) initializes the input array to a
value of 5.

init(a,[1 2 3]) initializes an input array
of three elements to the values [1 2 3].

NOTES
The init value must be the same type as the
input array or be able to be converted to the
same type.  That is, you cannot initialize a
real array to a complex initial value because
a complex number cannot be converted to a
real number.

The mapping on the output container is the
same as the input val.

SEE ALSO
ramp(numElem,from,thru) and
randomize(x,low,high).

Alloc Array (from "Help On Features" 
dialog box).
END HELP
HELP integral(x)
An object used to calculate the integral
across all values of the input data using
Simpson's 1/3 rule.

USE
Use integral(x) to calculate the numerical
approximation of the indefinite integral of a
set of ordered, equally-spaced values (x).
The result is an array of the same size and
shape as the input x.  The result is the same
type as x except for Int32.  Int32 returns a
Real and has the same mappings (if any) as
the input x.

LOCATION
AdvMath ==> Calculus ==> integral(x)

EXAMPLE
integral([ 0 1 2 3 3 2 1 0 ]) returns 
[ 0 0.5 2 4.5 7.667 10.17 11.67 12.17 ].

NOTES
The integral(x) function is applicable to
one-dimensional arrays of simple numeric
values (Int32, Real, Waveform) and lists of
two-dimensional (two field) coordinates that
represent equally spaced ordered data.  For
mapped arrays, the mappings of the resultant
array will be identical to those of x.  For
coordinate lists, the values of the
independent field (first field) of each
coordinate will be identical to those of the
corresponding values in x.

For unmapped arrays, it is assumed that
the data is equally spaced and ordered, and a
value of 1 is assumed for the interval dx
between points.  For mapped arrays, the
operation is performed with the interval
value dx equal to (Xmax-Xmin)/N and is thus
automatically scaled appropriately.  For a
coordinate list, the independent (first
field) values are first checked to be sure
that they are ordered and equally spaced,
then the operation is performed on the
dependent (second field) values using the
previously determined spacing as the value
for dx.

If an unmapped array is used, but it is
known otherwise that the interval between
points is some value dx, then the correct
value for the operation can be obtained by
multiplying the result of integral(x) by the
known dx value.

When the values represent noisy data, the
result of integral(x) can often be improved
(in a pragmatic sense) by first filtering or
smoothing the data.  Smoothing removes much
of the unwanted noise which is superimposed
on the underlying values.  See the
polySmooth(x) function and related smoothing
functions for examples.

SEE ALSO
defIntegral(x,a,b).
END HELP
HELP intPart(x)
An object that returns the value of the
integer part of x.

USE
Use intPart(x) to obtain the integer part of
a container.  x may be any shape and of the
type Int32, Real, Coord, or Waveform.  The
intPart(x) function returns the integer
portion of the data.  If the data is less
than zero, it returns the ceil(x); otherwise
it returns the floor(x).  The result will
have the same mappings as x.

LOCATION
Math ==> Real Parts ==> intPart(x)

EXAMPLE
intPart([23.0 23.1 23.9 23.5 (-23.5)])
returns [23 23 23 23 -23].

NOTES
Mappings are retained in the result.

SEE ALSO
abs(x), ceil(x), Complex Parts, floor(x),
fracPart(x), Real Parts, and round(x).
END HELP
HELP inverse(x)
An object used to calculate the inverse of a
square matrix.

USE
Use inverse(x) to calculate the inverse of
the square matrix x.  The x input must be a
square matrix shape and of the type Int32,
Real, Complex or PComplex.  For x input of
all types, the same output type and shape is
returned, except for Int32, which returns a
Real.  A square matrix has the same number of
rows as columns.

LOCATION
AdvMath ==> Matrix ==> inverse(x)

EXAMPLE
Where x is a square matrix [ [1 2] [3 4] ],
inverse(x) returns [ [-2 1] [1.5 -0.5] ].

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

SEE ALSO
det(x), identity(x), and transpose(x).
END HELP
HELP j(x)
An object that returns a Complex number with
x as the imaginary part.

USE
Use j(x) to generate a Complex number of the
same shape as x, with x as the imaginary part
and 0 as the real part.  x may be any shape
and of the type Int32, Real, or Waveform.

LOCATION
Math ==> Complex Parts ==> j(x)

EXAMPLE
j(5) returns the Complex number (0,5).

NOTES
Mappings are retained in the result.  To
return a complex number with x as the real
part, use the type promotions on input
terminals to promote Real to Complex.

SEE ALSO
Complex Parts, conj(x), im(x), mag(x),
phase(x), re(x), and Real Parts.

Build Complex and UnBuild Complex 
(from "Help On Features" dialog box).
END HELP
HELP j0(x)
An object used to calculate the Bessel
function of x of the first kind of order
zero.

USE
Use j0(x) to find the Bessel function of x of
the first kind of order zero.  The x input
may be of any size and shape and of the type
Int32, Real, Coord, or Waveform.  For x input
of all types, the same output type is
returned, except for Int32 which returns a
Real type.  For Coord input types, the
operation is done on the dependent variable.

LOCATION
AdvMath ==> Bessel ==> j0(x)

EXAMPLE
j0(10) returns -0.245935764451348.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

SEE ALSO
Ai(x), Bi(x), j1(x), jn(x,n), y0(x), y1(x),
and yn(x,n).
END HELP
HELP j1(x)
An object used to calculate the Bessel
function of x of the first kind of order one.

USE
Use j1(x) to find the Bessel function of x of
the first kind of order one.  The x input may
be of any size and shape and of the type
Int32, Real, Coord, or Waveform.  For x input
of all types, the same output type is
returned, except for Int32 which returns a
Real type.  For Coord input types, the
operation is done on the dependent variable.

LOCATION
AdvMath ==> Bessel ==> j1(x)

EXAMPLE
j1(1) returns 0.440050585744933.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

SEE ALSO
Ai(x), Bi(x), j0(x), jn(x,n), y0(x), y1(x),
and yn(x,n).
END HELP
HELP jn(x,n)
An object used to calculate the Bessel
function of x of the first kind of order n.

USE
Use jn(x,n) to find the Bessel function of x
of the first kind of order n.  The x input
may be of any size and shape and of the type
Int32, Real, Coord, or Waveform.  For x input
of all types, the same output type is
returned, except for Int32 which returns a
Real type.  For Coord input types, the
operation is done on the dependent variable.

The n parameter must be of Int32 type or
be able to be converted to Int32.  The n
parameter also has to be a Scalar in shape or
the same shape as x.

LOCATION
AdvMath ==> Bessel ==> jn(x,n)

EXAMPLE
jn(1,2) returns 0.114903484931900.

NOTES
If both of the inputs are mapped, then the
mappings must be the same.  The return value
has the same mappings as the input if either
input is mapped.  If neither of the inputs is
mapped, then the output is unmapped.

SEE ALSO
Ai(x), Bi(x), j0(x), j1(x), y0(x), y1(x), and
yn(x,n).
END HELP
HELP k0(x)
An object used to calculate the modified
(hyperbolic) Bessel function of x of the
second kind of order zero.

USE
Use k0(x) to find the modified (hyperbolic)
Bessel function of x of the second kind of
order zero.  The x input may be of any size
and shape and of the type Int32, Real, Coord,
or Waveform.  For all x input types, the same
output type is returned, except for Int32
which returns a Real type.  For Coord input
types, the operation is done on the dependent
variable.

LOCATION
AdvMath ==> Hyper Bessel ==> k0(x)

EXAMPLE
k0(1) returns 0.421024438240708.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

The x argument must be positive.

SEE ALSO
i0(x), i1(x), and k1(x).
END HELP
HELP k1(x)
An object used to calculate the modified
(hyperbolic) Bessel function of x of the
second kind of order one.

USE
Use k1(x) to find the modified (hyperbolic)
Bessel function of x of the second kind of
order one.  The x input may be of any size
and shape and of the type Int32, Real, Coord,
or Waveform.  For all x input types, the same
output type is returned, except for Int32
which returns a Real type.  For Coord input
types, the operation is done on the dependent
variable.

LOCATION
AdvMath ==> Hyper Bessel ==> k1(x)

EXAMPLE
k1(1) returns 0.601907230197234.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

The x argument must be positive.

SEE ALSO
i0(x), i1(x), and k0(x).
END HELP
HELP < (less than)
An object that performs an "is less than"
operation on two operands.

USE
Use < to determine whether the value(s) of
one container is less than the value(s) of
another container.  The two containers may be
of type Int32, Real, Coord, Waveform, Text,
or Enum.  The two containers may be of any
shape.  But if one of the containers is an
array, the other must be either a scalar or
an array of the same size and shape.  The
result is a scalar Int32, with the value 0 or
1.  If the first operand is less than the
second, the value of the result is 1;
otherwise the value is 0.

If both operands are of type Coord, their
independent variable(s) must be identical
before the operation is even attempted; if
not, an error is returned.  Enums are
converted to Text for the comparision.  Text
is compared using ASCII lexical ordering.

When two arrays are compared to each
other, each pair of elements must satisfy the
relational operator for the operation to
return 1.

LOCATION
Math ==> Relational ==> <

EXAMPLE
A scalar and an array:  3.0 < [1 3 9] 
returns 0.

An array and a scalar:  [1 2 3] < 4
returns 1.

Two arrays:  [1 2 3] < [2 3 5] returns 1.

Two arrays:  [1 4 3] < [2 3 5] returns 0.

Two Coord scalars:  coord(1,3) <
coord(1,5) returns 1.

Two Coord scalars:  coord(1,3) <
coord(2,5) returns an error.

Two Text scalars:  "too" < "zoo" 
returns 1.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Coord, or a mapped
array of any other type), the other container
must be unmapped or have identical mappings;
otherwise an error is returned.

SEE ALSO
AND, == (equal to), > (greater than),
>= (greater than or equal to), 
>= (less than or equal to), NOT, != (not
equal to), OR, Relational, and XOR.

Comparator, Conditional, and If/Then 
(from "Help On Features" dialog box).
END HELP
HELP <= (less than or equal to)
An object that performs an "is less than or
equal to" operation on two operands.

USE
Use <= to determine whether the value(s) of
one container is less than or equal to the
value(s) of another container.  The two
containers may be of type Int32, Real, Coord,
Waveform, Text, or Enum.  The two containers
may be of any shape.  But if one of the
containers is an array, the other must be
either a scalar or an array of the same size
and shape.  The result is a scalar Int32,
with the value 0 or 1.  If the first operand
is less than or equal to the second, the
value of the result is 1; otherwise the value
is 0.

If both operands are of type Coord, their
independent variable(s) must be identical
before the operation is even attempted; if
not, an error is returned.  Enums are
converted to Text for the comparison.  Text
is compared using ASCII lexical ordering.

When two arrays are mapped against each
other, each set of elements must satisfy the
relational operator for the operation to
return 1.

LOCATION
Math ==> Relational ==> <=

EXAMPLE
A scalar and an array:  3.0 <= [1 3 9]
returns 0.

An array and a scalar:  [1 2 4] <= 4
returns 1.

Two arrays:  [1 2 3] <= [2 3 3] returns 1.

Two arrays:  [1 4 3] <= [2 3 5] returns 0.

Two Coord scalars:  coord(1,3) <=
coord(1,5) returns 1.

Two Coord scalars:  coord(1,3) <=
coord(2,5) returns an error.

Two Text scalars:  "too" <= "zoo" returns
1.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Coord, or a mapped
array of any other type), the other container
must be unmapped or have identical mappings;
otherwise an error is returned.

SEE ALSO
AND, == (equal to), > (greater than), 
>= (greater than or equal to), 
< (less than), NOT, != (not equal to),
OR, Relational, and XOR.

Comparator, Conditional, and If/Then 
(from "Help On Features" dialog box).
END HELP
HELP linear regression
An object used to fit a linear regression
line to (x,y) data.

USE
Use the linear regression to fit a straight
line to the data using the
equation y = C0 + C1*x, where x is the x
coordinate and C0 and C1 are calculated
coefficients.  This type of regression should
be thought of as fitting the best straight
line through the data.

The linear regression object expects an
array of Coord type of input with one
independent variable, that is, an (x,y) pair.
If the input array is not a Coord type, an
attempt is made to convert it to Coord.  If
the input data is mapped (Waveform, Spectrum,
or a mapped array) then the conversion to
Coord uses the mapping information to create
the x part of the (x,y) pairs.  If the input
data is not mapped (for example, an array),
then the x part of the (x,y) pair is
implicitly generated from its position in the
array.

LOCATION
AdvMath ==> Regression ==> linear

OPEN VIEW PARAMETERS
The Fit Type field on the open view is used
to change the regression type to linear,
logarithmic, exponential, power curve or
polynomial regression.  Clicking on the field
will bring up a list of the different
regression types.

EXAMPLE
See Regression for a Coord conversion
example.

NOTES
See Regression for general notes on
regression.

SEE ALSO
exponential regression, logarithmic
regression, meanSmooth(x,numPts),
movingAvg(x,numPts), polynomial regression,
polySmooth(x), and power curve regression.

Build Coord (from "Help On Features" 
dialog box).
END HELP
HELP log(x)
An object that returns the natural logarithm
of the value of x.

USE
Use log(x) to generate the natural logarithm
(base e) of a number x.  x can be any shape
and of type Int32, Real, Coord, Waveform,
Complex, PComplex, or Spectrum.  Int32
arguments will return a Real; all others will
return the same type.  All will return the
same shape as x.

LOCATION
Math ==> Power ==> log(x)

EXAMPLE
log([10 2]) will return [2.302585092994
0.693147180559945].

log((1,2)) will return (0.804718956,
1.10714872).

NOTES
Mappings are retained in the result.

SEE ALSO
exp(x), exp10(x), ^ (exponent), log10(x), and
Power.
END HELP
HELP log10(x)
An object that returns the common logarithm
of the value of x.

USE
Use log10(x) to generate the common logarithm
(base 10) of a number x.  x can be any shape
and of type Int32, Real, Coord, Waveform,
Complex, PComplex, or Spectrum.  Int32
arguments will return a Real; all others will
return the same type.  All will return the
same shape as x.

LOCATION
Math ==> Power ==> log10(x)

EXAMPLE
log10([10 2]) will return 
[1 0.301029995663981].

log10((1,2)) will return 
[0.349485, 0.480828579].

NOTES
Mappings are retained in the result.

SEE ALSO
exp(x), exp10(x), ^ (exponent), log(x), and
Power.
END HELP
HELP logarithmic regression
An object used to fit a logarithmic curve to
data.

USE
Use the logarithmic regression to fit the
data to the equation:

y = C0 + C1*log(x)

where x is the x coordinate and C0 and C1
are calculated coefficients.  The log
function is the natural logarithm.  The input
data (x) must always be greater than zero.

The logarithmic regression object expects
an array of Coord type of input with one
independent variable, that is, an (x,y) pair.
If the input array is not a Coord type, an
attempt is made to convert it to Coord.  If
the input data is mapped (Spectrum or a
mapped array) then the conversion to Coord
uses the mapping information to create the x
part of the (x,y) pairs.  If the input data
is not mapped (for example, an array), then
the x part of the (x,y) pair is implicitly
generated from its position in the array.

LOCATION
AdvMath ==> Regression ==> logarithmic

OPEN VIEW PARAMETERS
The Fit Type field on the open view is used
to change the regression type to linear,
logarithmic, exponential, power curve or
polynomial regression.  Clicking on the field
will bring up a list of the different
regression types.

EXAMPLE
See Regression for a Coord conversion
example.

NOTES
See Regression for general notes on
regression.

This function will not work for unmapped
arrays.  Unmapped arrays are
converted to Coord starting with x=0, which
will fail in the log function.  This function
will not work with a Waveform for the same
reason.

SEE ALSO
exponential regression, meanSmooth(x,numPts),
movingAvg(x,numPts), polynomial regression,
polySmooth(x), and power curve regression.

Build Coord (from "Help On Features" 
dialog box).
END HELP
HELP Logical
A menu item.

USE
Use Logical to access the following objects
which perform logical operations on operands:
* AND
* OR
* XOR
* NOT

LOCATION
Math ==> Logical ==>

NOTES
If logic requirements are met, a 1 is
returned.  If logic requirements are not met,
a 0 is returned.

Note that the return value is of type
Int32 and is the same shape as the operands.
This is different than the conditionals, such
as ==, that always return a scalar.

The logical operators are defined for type
Text only in the sense of whether the string
is null or not.  That is, "zoo" AND "" (null
string) is logically false since the second
string is null.  Remember that when comparing
a Text type to a non-string type, the latter
is promoted to a Text type.  This means that
"zoo" AND 0 is true since the Real 0 is
promoted to the string "0" and, since both
strings are non-null, the AND expression is
true and returns 1.

SEE ALSO
Relational.

Conditional and If/Then in Help ==> On
Features.
END HELP
HELP logMagDist(x, from,thru,logStep)
An object used to calculate the distribution
of numbers in the input container given a
logarithmic distribution.

USE
Use logMagDist(x,from,thru,logStep) to
calculate a distribution of the log10 values
of the values in the input array.  The
distribution is done in the range of from to
thru by a size of logStep.  The logStep
parameter is the sub-range size in the log10
domain into which the log values are sorted
(for example, a logStep of 0.2 would be
equivalent to 5 sub-ranges per decade).

The x input may be of any size and of the
type Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  For Complex,
PComplex, and Spectrum type inputs, the
magnitude of the complex number is calculated
first, then that magnitude is used in
determining the frequency distribution.  The
x input shape must be an Array.

Since log10(x) is not defined for values
of x<=0, the input values should be positive.

For input of all types, a Real Array 1D is
returned.  Each array element represents how
many of the input value will fit in each
distribution range.

The from, thru and logStep parameters must
be Scalar in shape and of Real type or be
able to be converted to Real.

The from parameter must be less than the
thru parameter.

The logStep parameter must be greater than
zero.

LOCATION
AdvMath ==> Freq Distribution ==>
logMagDist(x,from,thru,logStep)

EXAMPLE
logMagDist(x,1,100,1), where x is the array:

[1 2 3 10 40 50 100 100 100]

returns the array [3 6].  In this example
there are 2 sub-ranges ranging from 1 to 2 by
1.  The output array shows how many of the
input numbers fall into each range.

NOTES
The sub-ranges for the distribution are
determined in the following manner.  Note
that the log10 of "from" and "thru"
parameters is calculated before determining
the range distribution.

Range  Range      range         Range
        Min                      Max
1. "from"      <= range1 < "from"+"step" 
2. range1limit <= range2 < range1limit+"step"
3. range2limit <= range3 < range2limit+"step"
...  ...  ...  ...
n-1 range(n-2)limit <= range(n-1) <= "thru" 

Mappings on the operands are ignored and
the return value is not mapped.

SEE ALSO
magDist(x,from,thru,step).
END HELP
HELP logRamp (numElem,from, thru)
An object that generates a logarithmically
ramped array.

USE
Use logRamp(numElem,from,thru) to generate a
Real one-dimensional array of length numElem,
with the values logarithmically ramped from
from to thru.  numElem must be a scalar
container which is, or can be converted to,
Int32 and with a value greater than zero.
from and thru must be scalar containers which
are, or can be converted to, Real.  If from
is less than thru the ramping is positive;
otherwise it automatically ramps negatively.
Both from and thru must have values greater
than zero.

LOCATION
Math ==> Generate ==>
logRamp(numElem,from,thru)

EXAMPLE
logRamp(3, 1, 100) returns a 1D Array with
values [1 10 100].

NOTES
The return value has no mappings.

The algorithm for generating values is:

Y[I]=exp10(log10(from)+I*((log10(thru)
  -log10(from))/numElem-1))

for I=0..numElem-1

This has the effect that the last element
in the resultant array has the value thru.

SEE ALSO
Alloc Real and ramp(numElem,from,thru).
END HELP
HELP mag(x)
An object that returns the magnitude of a
PComplex number x.

USE
Use mag(x) to extract the magnitude of a
PComplex number x.  x can be any shape and of
type Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  For types Int32,
Real, Coord, and Waveform, the same type with
the same value(s) is returned.  For types
Complex, PComplex, and Spectrum, mag(x)
returns a Real container with the value of
the magnitude of the PComplex number.
(Complex is first converted to PComplex.)

LOCATION
Math ==> Complex Parts ==> mag(x)

EXAMPLE
mag( (1,@45) ) returns 1.

NOTES
Mappings are retained in the result.

SEE ALSO
conj(x), im(x), j(x), phase(x), re(x), and
Real Parts.

Build Complex, Trig Mode, and UnBuild
Complex (from "Help On Features" dialog box).
END HELP
HELP magDist(x,from, thru,step)
An object used to calculate the distribution
of numbers in the input container.

USE
Use magDist(x,from,thru,step) to calculate a
distribution of numbers in the input array.
The distribution is done in the range of from
to thru by a size of step.  The step
parameter is the size of the range of the
sub-array that the numbers will go into.

The x input may be of any size and of the
type Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  For Complex,
PComplex, and Spectrum type inputs, the
magnitude of the complex number is calculated
first, then that magnitude is used to
calculate the frequency distribution.  The x
input shape must be an Array.

For input of all types, a Real Array 1D is
returned.  Each array element represents how
many of the input values will fit in each
distribution range.

The from, thru and step parameters must be
Scalar in shape and of Real type or be able
to be converted to Real.

The from parameter must be less than the
thru parameter.

The step parameter must be greater than
zero.

LOCATION
AdvMath ==> Freq Distribution ==>
magDist(x,from,thru,step)

EXAMPLE
magDist(x,1,5,1), where x is the array 
[1 2 3 4 5 5 3 3 3 2 2 2], returns the array 
[1 4 4 3].  In this example there are four
sub-ranges ranging from 1 to 5 by 1.  The
output array shows how many of the input
numbers fall into each sub-range.

NOTES
The sub-ranges for the distribution are
determined in the following manner:

Range Range       range       Range
       Min                     Max
1. "from"      <= range1 < "from" +"step" 
2. range1limit <= range2 < range1limit+"step"
3. range2limit <= range3 < range2limit+"step"
...  ...  ...  ...
n-1 range(n-2)limit <= range(n-1) <= "thru"

Mappings on the operands are ignored and
the return value is not mapped.

SEE ALSO
logMagDist(x,from,thru,logStep).
END HELP
HELP matDivide(numer, denom)
This object will divide two matrices A and B.
The matDivide(numer,denom) operation is
defined in algebraic terms as
A/B; but in matrix (linear algebraic) terms,
it is defined as inv(B)*A.

USE
Use the matDivide(numer,denom) to divide one
matrix into another.  Given the linear
system BX=A, where the B and A matrices are
known, solve for the solution matrix X.  In
algebraic terms the
solution is to solve for X by dividing A by
B:  X = A/B.  But, by solving the system of
equations with linear algebraic matrix rules,
the operation is really X = inv(B)*A.  This
operation is useful to find the solution of a
linear system of n equations in n unknowns.

If B is an n x n (square) matrix, then the
linear system
BX = A is a system of n equations in n
unknowns.  Suppose that B is non-singular.
Then inv(B) (inverse of B) exists and
multiplying BX = A by inv(B) on both sides, 
obtains X = inv(B)*A.

The solution to the multiplication of
inv(B)*A is the solution to the given linear
system.  If B is nonsingular, then there is a
unique solution to the system.

LOCATION
AdvMath ==> Matrix ==> matDivide(numer,denom)

EXAMPLE
matDivide(numer,denom), where A is an 3x3
matrix [ [1 1 1] [0 2 3] [5 5 1] ] and B is a
3x1 matrix [ [8] [24] [8] ], returns a 3x1
matrix [ [0] [0] [8] ].

NOTES
Mappings on the operand are ignored and the
return value is not mapped.

matDivide(numer,denom) uses the inverse of
B; hence, B must be a square matrix.  The
rules for matMultiply(A,B) apply to the
inv(B) * A operation.

SEE ALSO
/ (divide) and matMultiply(A,B).
END HELP
HELP matMultiply(A,B)
An object used to multiply two matrices
together according to linear Algebra rules.

USE
Use matMultiply(A,B) to multiply together the
two input matrices A and B.  Let A be an m x
p matrix and B be a p x n matrix.  The
matMultiply of A and B is a new matrix, Z,
that is an m x n matrix.  Notice that the
multiplication is defined if and only if the
matrices are of the sizes where A is an m x p
matrix and B is a p x n matrix (that is,
where the number of rows of the second matrix
equals the number of columns of the first).

The input matrices must be of matrix shape
and of the type Int32, Real, Complex or
PComplex.  For all input types the same
output type is returned, except for Int32
which returns a Real type.  If the two
matrices are not of the same type, they lower
type matrix is promoted to the higher type
and the return value is of the higher type.

LOCATION
AdvMath ==> Matrix ==> matMultiply(A,B)

EXAMPLE
matMultiply(A,B), where A is an 2x1 matrix 
[ [3] [1] ] and B is a 1x2 matrix [2 4],
returns a 2x2 matrix [ [6 12] [2 4] ].

NOTES
Mappings on the operand are ignored and the
return value is not mapped.

SEE ALSO
matDivide(numer,denom) and * (multiply).
END HELP
HELP Matrix
A menu item.

USE
Use the Matrix operations to calculate common
linear algebra operations on matrices.
* det(x)
* inverse(x)
* transpose(x)
* identity(x)
* minor(x,row,col)
* cofactor(x,row,col)
* matMultiply(A,B)
* matDivide(numer,denom)

LOCATION
AdvMath ==> Matrix ==>
END HELP
HELP max(x)
An object used to return the maximum value in
the input container.

USE
Use max(x) to return the maximum value in the
container.

The x input may be of any size and shape
and of the type Int32, Real, Coord, Waveform,
or Text.  For x input of all types except
Waveform, the same output type is returned,
but is Scalar in shape.  A Waveform input
type returns a Real Scalar.  For Coord input
types, the operation is done on the dependent
variable.  For Text input types, the max(x)
text string is the one that is the highest
lexically ordered string.

LOCATION
AdvMath ==> Statistics ==> max(x)

EXAMPLE
max(x), where x is the array 
[5 34 1 54 6 2 9 7 16 42], returns 54.

NOTES
Mappings on the operand are ignored.

SEE ALSO
maxIndex(x), maxX(x), mean(x), median(x),
min(x), mode(x), rmx(x), sdev(x), and
vari(x).
END HELP
HELP maxIndex(x)
An object used to return the index in the
input array of the largest element.

USE
Use maxIndex(x) to return the index of the
largest element in a 1D array.

The x input must be of Array 1D shape and
of the type Int32, Real, Coord, Waveform, or
Text.  For all x input types, an Int32 number
representing the index of the largest element
is returned.

LOCATION
AdvMath ==> Data Filtering ==> maxIndex(x)

EXAMPLE
Applying the maxIndex(x) to an array, where x
is the array [.1, .4, .6, .9] returns 3
because .9 is the largest element of the
array.

maxIndex(x) of ["Ken" "Sue" "Randy"
"Doug"] returns 1 because "Sue" is the
highest lexically ordered term.

NOTES
Note that array indices start with zero.

Mappings on the operand are ignored.

SEE ALSO
max(x), maxX(x), min(x), minIndex(x), and
minX(x).
END HELP
HELP maxX(x)
An object used to return the x value of a
maximum point of the input Array 1D where the
array is mapped.

USE
Use maxX(x) to return the Xindex of the
largest y element in a 1D (linear) array.
The x input must be of Array 1D shape and of
the type Int32, Real, Coord, Waveform, or
Text.  For x input of all types, a Real
Scalar container is returned.

If the data is mapped, the value returned
is the x value corresponding to the maximum y
value of the input data.  The x value is
calculated using the array mappings.  If the
data is not mapped, then the value returned
is the index in the array of the maximum y
value.  That is, it will return the
(implicit) position in the array of maximum x
value.

The Coord type returns the independent
variable x at the maximum y value.

This function is only useful for mapped
data or Coord types, as it is the same as
maxIndex(x) for unmapped data.

LOCATION
AdvMath ==> Data Filtering ==> maxX(x)

EXAMPLE
Take the maxX(x) of a sine waveform type that
has 256 points and is mapped over 0 to 20
milliseconds.  The return value is .009219.

Take the maxX(x) of an array, where x is
the unmapped array.  [.1 .4 .6 .9] returns 3
because .9 is the largest element of the
array.  This is identical to maxIndex(x).

SEE ALSO
max(x), maxIndex(x), min(x), minIndex(x), and
minX(x).

Get Mappings and Set Mappings 
(from "Help On Features" dialog box).
END HELP
HELP mday(aDate)
An object that returns the day of the month
of the time x.

USE
Use mday(aDate) to transform the given time x
into a container of the same shape with

value(s) 1 - 31 corresponding to the day of
the month.  x must be of type Int32, Real,
Coord, or Waveform of any shape.  Int32
returns Real; all others will return the same
type.  All will return the same shape as x.

LOCATION
Math ==> Time & Date ==> mday(aDate)

EXAMPLE
mday(dmyToDate(25,12,1991)) returns 25, the
25th day of the month.

NOTES
mday(aDate) returns 1-31, not 0-30.  This is
one of the few non-zero based functions in
HP VEE.  Mappings are retained in the return
value.

SEE ALSO
dmyToDate(d,m,y), hmsToHour(h,m,s),
hmsToSec(h,m,s), month(aDate), now(), Time &
Date, wday(aDate), and year(aDate).
END HELP
HELP mean(x)
An object used to calculate the mean value of
the data in the input container.

USE
Use mean(x) to return the mean (average)
value of the container.  The numbers in the
input container are added, then the sum is
divided by the number of elements in the
input.

The x input may be of any size and shape
and of the type Int32, Real, Coord, or
Waveform.  For x input of all types, a Real
Scalar container is returned.  For Coord
input types, the operation is done on the
dependent variable.

LOCATION
AdvMath ==> Statistics ==> mean(x)

EXAMPLE
Where x is the array [1 2 3 11 12 34],
mean(x) returns 10.5.

NOTES
Mappings on the operand are ignored.

SEE ALSO
max(x), median(x), min(x), mode(x), rms(x),
sdev(x), and vari(x).
END HELP
HELP meanSmooth(x, numPts)
An object used to smooth input data using the
mean of a specified number of data points
surrounding the data point of interest to
calculate the smoothed data point.

USE
Use meanSmooth(x,numPts) to perform a data
smoothing similar to the polySmooth(x)
routine.  The algorithm calculates an
arithmetic mean of the n data points around
the point to be smoothed.  For example, if n
is 5, take the mean of:  2 points before the
current point, the current point, and two
points after the current point.  If n is
even, the algorithm will add one more to the
number of points to make it odd.

The x input must be of Array 1D shape and
of the type Int32, Real, Coord, or Waveform.
For x input of all types, the same output
type is returned, except for Int32 which
returns a Real type.  The independent
variables of a Coord input type must be
equidistant, that is, the x-interval between
adjacent points must be a constant.  The
smoothing is only done on the dependent
variable (the y data of the Coord).

The noise suppression capability of this
technique is a function of the size n of the
averaging which you specify.  Large values of
n will suppress noise to a much greater
degree than small values of n.  Quite often
this function can be used to dramatically
improve the results of other functions (like
deriv(x,order)) if used to preprocess the
data.

LOCATION
AdvMath ==> Data Filtering ==>
meanSmooth(x,numPts)

NOTES
Mappings on input parameters are ignored and
the output has the same mappings as the input
parameter x.

SEE ALSO
movingAvg(x,numPts), polySmooth(x),
Regression types, and Signal Processing.
END HELP
HELP median(x)
An object used to calculate the median value
of the input container.

USE
Use median(x) to return the middle value of
the container.

The x input may be of any size and shape
and of the type Int32, Real, Coord, or
Waveform.  For x input of all types, a Real
Scalar is returned.  For Coord input types,
the operation is done on the dependent
variable.

LOCATION
AdvMath ==> Statistics ==> median(x)

EXAMPLE
median([1 2 3 8 20]) returns 3.

median(x), where x is the array [1 2 5 11
12 33], returns 8.  The median value is the
one in the middle of the range of numbers.
In the case where there are an even number of
numbers, the median is calculated as the
average between the two middle numbers.  In
this case, the median value is the average of
5 and 11, which is 8.

median([20 5 10]) returns 10.

NOTES
Mappings on the operand are ignored.

SEE ALSO
max(x), mean(x), min(x), mode(x), rms(x),
sdev(x), and vari(x).
END HELP
HELP min(x)
An object used to return the minimum value in
the input container.

USE
Use min(x) to return the minimum value in the
container.

The x input may be of any size and shape
and of the type Int32, Real, Coord, Waveform,
or Text.  For x input of all types except
Waveform, the same output type is returned,
but is Scalar in shape.  A Waveform input
type returns a Real Scalar.  For Coord input
types, the operation is done on the dependent
variable.  For Text input types, the min(x)
text string is the one that is the lowest
lexically ordered string.

LOCATION
AdvMath ==> Statistics ==> min(x)

EXAMPLE
min(x), where x is the array 
[5 34 1 54 6 2 9 7 16 42], returns 1.

NOTES
Mappings on the operand are ignored.

SEE ALSO
max(x), mean(x), median(x), minIndex(x),
minX(x), mode(x), rms(x), sdev(x), and
vari(x).
END HELP
HELP minIndex(x)
An object used to return the index in the
input array of the smallest element.

USE
Use minIndex(x) to return the index of the
smallest element in a 1D array.

The x input must be of Array 1D shape and
of the type Int32, Real, Coord, Waveform, or
Text.  For all x input types, an Int32 Scalar
number representing the index of the smallest
element is returned.

LOCATION
AdvMath ==> Data Filtering ==> minIndex(x)

EXAMPLE
Applying the minIndex(x) to an array, where x
is the array [.1 .4 .6 .9] returns 0 because
.1 is the smallest element of the array.

minIndex(x) of ["Ken" "Randy" "Doug"
"Sue"] returns 2 because "Doug" is the lowest
lexically ordered term.

NOTES
Note that array indices start with zero.

Mappings on the operand are ignored.

SEE ALSO
max(x), maxIndex(x), maxX(x), min(x), and
minX(x).
END HELP
HELP minor(x,row,col)
An object used to calculate the minor of a
matrix x at row r and column c.

USE
Use minor(x,row,col) to calculate the minor
of the square input matrix x.  The minor of
matrix is defined as the determinant of the
submatrix of the input matrix x obtained by
deleting the rth row and cth column.  The x
input must be a square matrix shape and of
the type Int32, Real, Complex or PComplex.
For x input of all types, output of the same
type is returned and is Scalar in shape,
except for Int32 which returns a Real.  The
input for the row and column to delete, r and
c, must be Int32 Scalar or be able to be
converted to Int32 type.

A square matrix has the same number of
rows as columns.

LOCATION
AdvMath ==> Matrix ==> minor(x,row,col)

EXAMPLE
minor(a,1,2), where a is a matrix [ [3 -1 2]
[4 5 6] [7 1 2] ], returns -34.

NOTES
Mappings on the operand are ignored.

The r and c inputs are expected to be of
type Int32 or be able to be converted to that
type.  The rows and columns of the matrix are
numbered from 0 to n-1 so be careful when
specifying which row and column to use.

SEE ALSO
cofactor(x,row,col)and det(x).
END HELP
HELP minX(x)
An object used to return the x value of the
minimum point of the input Array 1D where the
array is mapped.

USE
Use minX(x) to return the Xindex of the
smallest y element in an 1D (linear) array.
The x input must be of Array 1D shape and of
the type Int32, Real, Coord, Waveform, or
Text.  For x input of all types a Real Scalar
container is returned.

If the data is mapped, the value returned
is the x value corresponding to the minimum y
value of the input data.  The x value is
calculated using the array mappings.  If the
data is not mapped, then the value returned
is the index in the array of the minimum y
value.  That is, it will return the
(implicit) position in the array of minimum x
value.

The Coord type returns the independent
variable x at the minimum y value.

This function is only useful for mapped
data or Coord types.  It is the same as
minIndex(x) for unmapped data.

LOCATION
AdvMath ==> Data Filtering ==> minX(x)

EXAMPLE
Take the minX(x) of a sine waveform that has
256 points and is mapped over 0 to 20
milliseconds.  The return value is .0107.

Take the minX(x) of an array, where x is
the unmapped array.  [.1 .4 .6 .9] returns 0
because .1 is the smallest element of the
array.  This is identical to minIndex(x).

SEE ALSO
max(x), maxIndex(x), maxX(x), min(x), and
minIndex(x).

Get Mappings and Set Mappings 
(from "Help On Features" dialog box).
END HELP
HELP mod (modulo)
An object that performs an arithmetic modulo
(remainder) of two operands.

USE
Use mod to determine the remainder of the
division of two containers.  The two
containers may be of type Int32, Real, Coord,
or Waveform.  The two containers may be of
any shape.  But if one of the containers is
an array, the other must be either a scalar
or an array of the same size and shape.  The
result is a container of the highest type,
with the same shape as the operands.

If both operands are of type Coord, they
must have their independent variable(s) match
exactly or an error is returned.  The modulo
is only performed on the dependent (last)
variable.

LOCATION

Math ==> + - * / ==> mod

EXAMPLE
A scalar modulo an array:  3.2 MOD [1 2 3]
returns [0.2 1.2 0.2].

An array modulo a scalar:  [1 2 3] MOD 2
returns [1 0 1].

Two Coord scalars:  coord(1,3) MOD
coord(1,5) returns coord(1,2).

Two Coord scalars:  coord(1,3) MOD
coord(2,5) returns an error.

Two scalars:  12.95 mod 2 returns 0.95.

Two scalars:  12.95 mod 2.1 returns 0.32.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Coord, or a mapped
array of any other type), the other container
must be unmapped or have identical mappings.
The return value will have the same mappings
as the operands; otherwise an error is
returned.

SEE ALSO
+ (add), div (truncated division), /
(divide), * (multiply), and - (subtract).
END HELP
HELP mode(x)
An object used to calculate the mode of the
data in the input container.

USE
Use mode(x) to return the mode of the value
in the container.  The mode value is the one
which is found most often in the data.  In
case of bimodal data (two numbers represented
the same number of times) or higher modes,
mode(x) returns the lowest valued mode found
in the array container.

In the case where there is no mode value
(that is, every number is unique), the first
value in the input container is returned.

The x input may be of any size and shape
and of the type Int32, Real, Coord, or
Waveform.  For x input of all types except
Int32, a Real Scalar is returned.  For Coord
input types, the operation is done on the
dependent variable.  An Int32 input type
returns an Int32.

LOCATION
AdvMath ==> Statistics ==> mode(x)

EXAMPLE
Single mode:  where x is the array 
[2 1 12 11 2 33], mode(x) returns 2.

Bimodal:  where x is the array 
[2 1 2 12 11 12], mode(x) returns 2.

No mode:  where x is the array 
[3 2 1 11 12 33], mode(x) returns 3.

NOTES
Mappings on the operand are ignored.

SEE ALSO
max(x), mean(x), median(x), min(x), rms(x),
sdev(x), and vari(x).
END HELP
HELP month(aDate)
An object that returns the month of the year
of the time x.

USE
Use month(aDate) to transform the given time
x into a container of the same shape with

value(s) 1 - 12 corresponding to the month of
the year.  x must be of type Int32, Real,
Coord, or Waveform of any shape.  Int32
returns Real; all others will return the same
type.  All will return the same shape as x.

LOCATION
Math ==> Time & Date ==> month(aDate)

EXAMPLE
month(dmyToDate(25,12,1991)) returns 12, the
12th month of the year.

NOTES
month(aDate) returns 1-12, not 0-11.  This is
one of the few non-zero based functions in
HP VEE.  Mappings are retained in the return
value.

SEE ALSO
dmyToDate(d,m,y), hmsToHour(h,m,s),
hmsToSec(h,m,s), mday(aDate), now(), Time &
Date, wday(aDate), and year(aDate).
END HELP
HELP movingAvg(x,numPts)
An object used to smooth the input data using
the average of a specified number of data
points preceding the data point of interest
to calculate the smoothed data point.

USE
Use movingAvg(x,numPts) to perform a data
smoothing similar to the meanSmooth(x,numPts)
routine.  The algorithm calculates an
arithmetic mean of n previous data points.

The x input must be of Array 1D shape and
of the type Int32, Real, Coord, or Waveform.
For x input of all types the same output type
is returned, except for Int32 which returns a
Real type.  The independent variables of a
Coord input type must be equidistant, that
is, the x-interval between adjacent points
must be a constant.  The smoothing is only
done on the dependent variable (the y data of
the Coord).

This technique tends to represent more of
a "historical" view of the data since, for
any point in the array, the average value is
calculated only from earlier points.  This is
in contrast to the average value being
calculated from points on both sides of the
point in question, as is the case for
polySmooth(x) and meanSmooth(x,numPts).

LOCATION
AdvMath ==> Data Filtering ==>
movingAvg(x,numPts)

EXAMPLE
If n is 5, the average of the 4 previous
points and the point of interest are used to
determine what the smoothed point should be.

NOTES
Mappings on input parameters are ignored and
the output has the same mappings as the input
parameter x.

SEE ALSO
meanSmooth(x,numPts), polySmooth(x),
Regression types, and Signal Processing.
END HELP
HELP * (multiply)
An object that performs an arithmetic
multiplication on two operands.

USE
Use * to multiply the values of two
containers.  The two containers may be of any
type and of any shape.  If one of the
containers is an array, the other must be
either a scalar or an array of the same size
and shape.  The result is a container of the
highest type, with the same shape as the
operands.

If both operands are of type Coord, they
must have their independent variable(s) match
exactly or an error is returned.  The
multiplication is only performed on the
dependent (last) variable.

If one of the containers is Text, the
other must be a container which is, or can
be, converted to an Int32.  Text
multiplication consists of the string
repeated the number of times given by the
value of the Int32.  Enums are converted to
Text for the multiplication.

This multiplication operation performs a
parallel multiplication on all elements of
the arrays, including matrices.  For a matrix
multiply, see the function matMultiply(A,B).

LOCATION

Math ==> + - * / ==> *

EXAMPLE
Array times a scalar:  [1 2 3] * 3 returns 
[3 6 9].

Two arrays:  [4 5 6] * [1 2 3] returns 
[4 10 18].

Two PComplex scalars:  (2,@45) * (3,@90)
returns (6,@135) with Trig Mode set to
Degrees.

Two Coord scalars:  coord(1,3) *
coord(1,5) returns coord(1,15).

Two Coord scalars:  coord(1,3) *
coord(2,5) returns an error.

Text times a scalar:  "hello" * 3 returns
"hellohellohello".

A Text array times an array:  
["hello" "b"] * [3 2] returns 
["hellohellohello" "bb"].

NOTES
If either of the containers is mapped (that
is, of type Waveform, Spectrum, Coord, or a
mapped array of any other type), the other
container must be unmapped or have identical
mappings.  The return value will have the
same mappings as the operands; otherwise an
error is returned.

SEE ALSO
+ (add), / (divide), matMultiply(A,B), 
and - (subtract).
END HELP
HELP NOT
An object that performs a logical NOT
operation on one operand.

USE
Use NOT to determine the logical opposite of
the value(s) of a container.  The container
may be of any type and of any shape.  The
result is an Int32 of the same shape as the
operand, with value(s) 0 or 1.  If the
operand is false (zero), the value of the NOT
operator is 1; otherwise the value is 0.

For Coord containers, only the dependent
(last) variable is considered for the NOT
operation.

For Complex, PComplex, and Spectrum
containers, the value of the operand is true
if either part is non-zero.  Text is true if
non-null.  Enums are converted to Text for
the operation.

LOCATION
Math ==> Logical ==> NOT

EXAMPLE
A scalar:  NOT 3 returns 0.

A scalar:  NOT 0 returns 1.

An array:  NOT [-3 0 3] returns [0 1 0].

A PComplex scalar:  NOT (1,@90) returns 0.

A Complex scalar:  NOT (0,1) returns 0.

A Complex scalar:  NOT (0,0) returns 1.

A Coord scalar:  NOT coord(1,3) returns 0.

A Coord scalar:  NOT coord(1,0) returns 1.

A Text scalar:  NOT "too" returns 0.

A Text scalar:  NOT "" returns 1.

NOTES
The result has the same mapping as the
operand.

Note that the If/Then device requires the
expression(s) inside it to evaluate to either
a scalar or an array, which is either all
zeros or all ones.

SEE ALSO
Conditional and If/Then in Help ==> On
Features.
END HELP
HELP != (not equal to)
An object that performs an "is not equal
to" operation on two operands.

USE
Use != to determine whether the value(s) of
one container is not equal to the value(s) of
another container.  The two containers may be
of any type and of any shape.  If one of the
containers is an array, the other must be
either a scalar or an array of the same size
and shape.  The result is a scalar Int32 with
the value 0 or 1.  If the first operand is
not equal to the second, the value of the
result is 1; otherwise the value is 0.

For Coord containers, if any of the
independent variable(s) do not match exactly,
an error is returned.  For Complex, PComplex,
and Spectrum containers, if either part or
both parts do not match, the result is 1.
Enums are converted to Text for the
comparison.

Arrays must have one or more of their
respective values not equal for the result to
be 1.

LOCATION
Math ==> Relational ==> !=

EXAMPLE
A scalar and an array:  3.0 != [3 3 3]
returns 0.

A scalar and an array:  3.0 != [3 1 3]
returns 1.

Two arrays:  [1 2 3] != [1 2 4] returns 1.

Two PComplex scalars:  (1,@90) != (1,@85)
returns 1.

Two Complex scalars:  (2,3) != (2,4)
returns 1.

Two Complex scalars:  (2,3) != (2,3)
returns 0.

Two Coord scalars:  coord(1,3) !=
coord(1,5) returns 1.

Two Coord scalars:  coord(1,3) !=
coord(2,3) returns an error.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Spectrum, Coord, or a
mapped array of any other type), the other
container must be unmapped or have identical
mappings; otherwise an error is returned.

SEE ALSO
AND, == (equal to), > (greater than), 
>= (greater than or equal to), 
< (less than), <= (less than or equal to),
NOT != (not equal to), OR, Relational, 
and XOR.

Comparator and Conditional in Help ==>
On Features.
END HELP
HELP now()
An object that returns the current time.

USE
Use now() to generate a Real scalar container
with the value of the current time.  The
value of the Real is the number of seconds
since 00:00 hours 1 January 0001 AD given in
UTC.

LOCATION
Math ==> Time & Date ==> now()

EXAMPLE
now() returns around 62.802G.

SEE ALSO
dmyToDate(d,m,y), hmsToHour(h,m,s),
hmsToSec(h,m,s), mday(aDate), month(aDate),
Time & Date, wday(aDate), and year(aDate).
END HELP
HELP OR
An object that performs a logical OR
operation on two operands.

USE
Use OR to determine whether the value(s) of
either of two containers is logically true
(non-zero).  The two containers may be of any
type and of any shape.  If one of the
containers is an array, the other must be
either a scalar or an array of the same size
and shape.  The result is an Int32 of the
same shape as the operands, with value(s) 0
or 1.  If either or both operands are
non-zero, the value of the OR operation is 1;
otherwise the value is 0.

If both operands are of type Coord, they
must have their independent variable(s) match
exactly or an error is returned.  Only the
dependent (last) variable is considered for
the OR operation.

For Complex, PComplex, and Spectrum
containers, the value of the operand is true
if either part is non-zero.  Text is true if
non-null.  Enums are converted to Text for
the operation.

LOCATION
Math ==> Logical ==> OR

EXAMPLE
A scalar and an array:  3 OR [3 3 3] returns
[1 1 1].

A scalar and an array:  0 OR [-3 0 3]
returns [1 0 1].

Two arrays:  [1 0 0] OR [0 1 (-1)] returns
[1 1 1].

Two PComplex scalars:  (1,@90) OR (1,@85)
returns 1.

Two Complex scalars:  (0,0) OR (0,1)
returns 1.

Two Complex scalars:  (0,1) OR (1,0)
returns 1.

Two Complex scalars:  (0,0) OR (0,0)
returns 0.

Two Coord scalars:  coord(1,3) OR
coord(1,5) returns 1.

Two Coord scalars:  coord(1,3) OR
coord(2,3) returns an error.

A Text scalar and a scalar number:  "too"
OR 0 returns 1.

A Text scalar and a scalar number:  "" OR
0 returns 1 because the 0 is promoted to the
string "0", which is non-null.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Spectrum, Coord, or a
mapped array of any other type), the other
container must be unmapped or have identical
mappings.  The return value will have the
same mappings as the operands; otherwise an
error is returned.

Note that the If/Then device requires the
expression(s) inside it to evaluate to either
a scalar or an array, which is either all
zeros or all ones.

SEE ALSO
AND, NOT, Relational, and XOR.

Conditional and If/Then in Help ==> On
Features.
END HELP
HELP ordinal(x)
An object that returns the ordinal value of
x.

USE
Use ordinal(x) to obtain the ordinal value of
a container.  x may be any shape and of the
types Int32, Real, Coord, Waveform, or Enum.
For Int32, Real, Coord, and Waveform, the
result is the same as the argument with the
same mappings.  For Enum, the result is an
Int32 of the same shape as x with the value
of the ordinal value of the Enum.  Enums
created from the Enum Constant have their
ordinal values starting at 0 and going to
n-1, where n is the number of Enum values in
the list.

LOCATION
Math ==> Real Parts ==> ordinal(x)

EXAMPLE
If an Enum constant is created with the
strings ordered "a", "b", and "c", and the
current value "a" is selected, ordinal(x) on
that container would return 0 since the first
value is selected.  Remember that HP VEE is
zero-based.  If, with the the same Enum
constant, the currently selected value is
"c", then ordinal(x) on that container would
return 2, the offset of the currently
selected value.

NOTES
Mappings are retained in the result.

SEE ALSO
Complex Parts, Enum, and Real Parts.
END HELP
HELP perm(n,r)
An object used to calculate the permutations
of n numbers taken r at a time.

USE
Use perm(n,r) to calculate the number of
permutations of n things taken r at a time
using the formula:


Perm(n, r) = n!  / (n - r)!

The !  symbol means factorial.

The n input may be of any shape and size
and of the type Int32, Real, Coord, or
Waveform.  For n input of all types the same
output type is returned, except for Int32
which returns a Real type.  The second r
parameter must be of the same type or be able
to be converted to the same type as the n
input value.  If both of the inputs are
arrays, they must be of exactly the same
shape and size.

The perm(n, r) operation is only defined
for integer operands so the input values,
while of unique type, are converted to Int32
type before the calculation is done.

LOCATION
AdvMath ==> Probability ==> perm(n, r)

EXAMPLE
perm(10,3) will return 720 as given by the
formula
10!/(10-3)!  = 10!/7!  = 10*9*8 = 720.

perm(10.4,3.9) will return 720 as given by
the formula
10!/(10-3)!  = 10!/7!  = 10*9*8 = 720.  The
rule about converting Real to Int32 forces
10.4 to 10 and 3.9 to 3.

NOTES
Both n and r must be positive and n must be
greater than r.

If both of the inputs are mapped, then the
mappings must be the same.  The return value
has the same mappings as the input if either
input is mapped.  If neither of the inputs is
mapped, then the output is unmapped.

SEE ALSO
beta(x,y), binomial(a,b), comb(n,r),
factorial(n), and gamma(x).
END HELP
HELP phase(x)
An object that returns the phase of a
PComplex number x.

USE
Use phase(x) to extract the phase of a
PComplex number x.  x can be any shape and of
type Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  For types Int32,
Real, Coord, and Waveform, the same type with
value(s) of zero is returned.  For types
Complex, PComplex, and Spectrum, phase(x)
returns a Real container with the value of
the polar phase angle of the PComplex number.
(Complex is first converted to PComplex.)
The phase(x) value is returned in the units
of the current Trig Mode.

LOCATION
Math ==> Complex Parts ==> phase(x)

EXAMPLE
phase((1,@45)) returns 45.

NOTES
Mappings are retained in the result.

SEE ALSO
conj(x), im(x), j(x), mag(x), re(x), and Real
Parts.

Build PComplex, Trig Mode, and UnBuild
PComplex (from "Help On Features" 
dialog box).
END HELP
HELP poly(x,vec)
An object that returns the polynomial value
of the values of x and vec.

USE
Use poly(x,vec) to generate the polynomial
result of the x data and vec coefficients.  
x can be any shape and of type Int32 or Real.
vec must be either a scalar or a
one-dimensional array.  poly(x,vec) takes the
elements of vec as the polynomial
coefficients, and x as the data.  vec starts
with a0, then a1, and so on, out to the
length of vec.  The return value is Real and
the same shape as x.

The polynomial equation computes:

a0 + a1*x + a2*x*x + a3*x*x*x + ...

LOCATION
Math ==> Polynomial ==> poly(x,vec)

EXAMPLE
poly([10 2], [3 2 4]) generates [423 23].

NOTES
Mappings of the resultant container are the
same as the input container x.

SEE ALSO
ramp(numElem,from,thru).
END HELP
HELP Polynomial
A menu item.

USE
Use Polynomial to access the following object
which generates a Real polynomial result from
the data and coefficient values.
* poly(x,vec)

LOCATION
Math ==> Polynomial ==>

SEE ALSO
Generate.
END HELP
HELP polynomial regression
An object used to fit a polynomial curve of
arbitrary degree to (x,y) data.

USE
Use the polynomial regression to fit the data
to the equation
y = C0 + C1*x + C2*x^2 + ..., where x is
the x coordinate and C0, C1, and so forth,
are calculated coefficients.  Polynomial
curve fitting requires the degree of the
polynomial to be set on the Order input field
on the regression object.

The polynomial regression object expects
an array of Coord type of input with one
independent variable, that is, an (x,y) pair.
If the input array is not a Coord type, an
attempt is made to convert it to Coord.  If
the input data is mapped (Waveform, Spectrum,
or a mapped array), then the conversion to
Coord uses the mapping information to create
the x part of the (x,y) pairs.  If the input
data is not mapped (for example, an array),
then the x part of the (x,y) pair is
implicitly generated from its position in the
array.

LOCATION
AdvMath ==> Regression ==> polynomial

OPEN VIEW PARAMETERS
The Fit Type field on the open view is used
to change the regression type to linear,
logarithmic, exponential, power curve or
polynomial regression.  Clicking on the
button will bring up a list of the different
regression types.

The Order input field is used to set the
order of the polynomial to which the data is
fitted.  The order of the polynomial fit must
be greater than or equal to one.  A
polynomial fit of order one fits the data to
a straight line and is the same as the linear
regression choice.

EXAMPLE
See Regression for a Coord conversion
example.

NOTES
See Regression for general notes on
regression.

SEE ALSO
exponential regression, linear regression,
logarithmic regression, meanSmooth(x,numPts),
movingAvg(x,numPts), polySmooth(x), and power
curve regression.

Build Coord (from "Help On Features" 
dialog box).
END HELP
HELP polySmooth(x)
An object used to smooth data using a
polynomial fit of the data.

USE
Use polySmooth(x) to smooth out data.  A
fourth order polynomial is fitted to the data
and a new data point is calculated based on
the curve fit using the polynomial.  To do
the 4th order curve fit, 5 points are used,
two on either side of the data point being
fitted and the data point itself, with
special consideration for the two end points.

The x input must be of Array 1D shape and
of the type Int32, Real, Coord, or Waveform.
For x input of all types the same output type
is returned, except for Int32 which returns a
Real type.  The independent variables of a
Coord input type must be equidistant.  That
is, the x-interval between adjacent points
must be a constant.  The smoothing is only
done on the dependent variable (the y data of
the Coord).

LOCATION
AdvMath ==> Data Filtering ==> polySmooth(x)

NOTES
The method used is to take a 5-element
sliding window and apply the standard formula
for a 4th-degree Stirling collocation
polynomial.  Refer to Francis Scheid,
"Schaum's Outline of Theory and Problems of
Numerical Analysis", McGraw Hill, New York,
NY, 1968.  ISBN #07-055197-9.

Mappings on the operand are ignored and
the output container has the same mappings as
the input.

The filtering operation which results from
this technique has a fixed "frequency
response" which suppresses only the noisiest
part of the data.  If more noise suppression
is required, see the meanSmooth(x,numPts)
function, which you can use to suppress much
more noise.

SEE ALSO
meanSmooth(x,numPts), movingAvg(x,numPts),
Regression types, and Signal Processing.
END HELP
HELP Power
A menu item.

USE
Use Power to access the following objects
which perform power functions such as square
root, square, log, exp, and log base 10.
* sq(x)
* sqrt(x)
* cubert(x)
* recip(x)
* log(x)
* log10(x)
* exp(x)
* exp10(x)

LOCATION
Math ==> Power ==>

SEE ALSO
+ (add), / (divide), ^ (exponent), 
* (multiply), and - (subtract).
END HELP
HELP power curve regression
An object used to fit a power curve to (x,y)
data.

USE
Use the power regression to fit the data to
the equation
y = C0 * x^C1, where x is the x coordinate
and C0 and C1 are calculated coefficients.

The power curve regression object expects
an array of Coord type of input with one
independent variable.  That is, an (x,y)
pair.  If the input array is not a Coord type
an attempt is made to convert it to Coord.
If the input data is mapped (Waveform,
Spectrum, or a mapped array), then the
conversion to Coord uses the mapping
information to create the x part of the (x,y)
pairs.  If the input data is not mapped (for
example, an array), then the x part of the
(x,y) pair is implicitly generated from its
position in the array.

LOCATION
AdvMath ==> Regression ==> power curve

OPEN VIEW PARAMETERS
The Fit Type field on the open view is used
to change the regression type to linear,
logarithmic, exponential, power curve or
polynomial regression.  Clicking on the field
will bring up a list of the different
regression types.

EXAMPLE
See Regression for a Coord conversion
example.

NOTES
See Regression for general notes on
regression.
This function will not work for unmapped
arrays.  Unmapped arrays are
converted to Coord starting with x=0, which
fails in the conversion in the log function.
The log function is used in the internal
regression calculation.

SEE ALSO
exponential regression, linear regression,
logarithmic regression, meanSmooth(x,numPts),
movingAvg(x,numPts), polynomial regression,
and polySmooth(x).

Build Coord (from "Help On Features" 
dialog box).
END HELP
HELP Probability
A menu item.

USE
Use these Probability functions in problems
dealing with random numbers and
probabilities.
* random(low,high)
* randomize(x,low,high)
* randomSeed(seed)
* perm(n,r)
* comb(n,r)
* gamma(x)
* beta(x,y)
* factorial(n)
* binomial(a,b)
* erf(x)
* erfc(x)

LOCATION
AdvMath ==> Probability ==>

SEE ALSO
Random Number and Random Seed in Help ==>
On Features.
END HELP
HELP prod(x)
An object used to multiply all the elements
of the input array.

USE
Use prod(x) to multiply together all the
elements of the input array.  The x input may
be of any size and shape and of the type
Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  For x input of all
types, except Waveform, Coord, and Spectrum,
output of the same type as the input is
returned.  An input of type Waveform or Coord
returns a Real Scalar.  An input of type
Spectrum returns a PComplex Scalar.

The output of this object is the
arithmetic product of all the data contained
in the input container and is Scalar in
shape.

LOCATION
AdvMath ==> Array ==> prod(x)

EXAMPLE
Where x is an array [1 2 3 4], prod(x)
returns 24.

NOTES
Mappings on the operand are ignored.

SEE ALSO
* (multiply) and sum(x).
END HELP
HELP ramp(numElem, from,thru)
An object that generates a linearly ramped
array.

USE
Use ramp(numElem,from,thru) to generate a
Real one-dimensional array of length numElem,
with the values linearly ramped from from to
thru.  numElem must be a scalar container
that is, or can be converted to, Int32 and
with a value greater than zero.  from and
thru must be scalar containers that are, or
can be converted to, Real.

If from is less than thru, the ramping is
positive; otherwise it automatically ramps
negatively.

LOCATION
Math ==> Generate ==> ramp(numElem,from,thru)

EXAMPLE
ramp(3, 0.5, 0) returns a one-dimensional
array with values [0.5 0.25 0].

ramp(5, 2, 10) returns a one-dimensional
array with values [2 4 6 8 10].

NOTES
The return value has no mappings.

The algorithm for generating values is:

Y[I] = from + I*(thru-from/numElem-1)

for I=0..numElem-1

This has the effect that the last element
in the resultant array has the value thru.

SEE ALSO
Alloc Real and logRamp(numElem,from,thru).
END HELP
HELP random(low,high)
An object used to generate random numbers
between a low and high value.  This function
generates pseudo-random numbers using the
linear congruential algorithm and 48-bit
integer arithmetic.

USE
Use random(low,high) to generate
pseudo-random numbers between the low and
high value.  The numbers generated are in the
interval including the low value, but not
including the high value, which is denoted as
"[l h)".

The l and h inputs must be Scalar in shape
and of the type Int32 or Real.  A Real Scalar
is returned in all cases that are in the
range of "[l h)".

This function only outputs a single Scalar
value.  Use the randomize(x,low,high)
function with an array input to generate an
array of scaled random numbers.

If the l value is greater than the h
value, then the range of random numbers
returned is in the interval "(l h]".

LOCATION
AdvMath ==> Probability ==> random(low,high)

EXAMPLE
random(0,1) will generate real numbers in the
range (0.0 1.0).  That is, including 0.0, but
excluding 1.0.

NOTES
random(low,high) will return a Real Scalar
container in the range "(0.0 1.0)".

Also, random(low,high) will return a
different number each time it is used in a
model or if it is activated several times by
an iterator object.

SEE ALSO
randomize(x,low,high) and randomSeed(seed).

Random Number and Random Seed 
(from "Help On Features" dialog box).
END HELP
HELP randomize(x, low,high)
An object used to randomize the values of the
input container in the range of [l h).  This
function generates pseudo-random numbers
using the linear congruential algorithm and
48-bit integer arithmetic.

USE
Use randomize(x,low,high) to generate
pseudo-random numbers between l and h, that
is, between the low and high value.  The
numbers generated are in the interval
including l, but not including h, which is
denoted as "[l h)".  All of the data in the
input container is overwritten with the
pseudo-random numbers.

The x input may be of any size and shape
and of the type Int32, Real, Coord, Waveform,
Complex, PComplex, or Spectrum.  For x input
of all types, the same output type is
returned, except for PComplex or Spectrum.
For PComplex and Spectrum types, only the
magnitude of the number is in the range [l
h).  The phase is random in the range (-PI to
PI).  For type Coord, only the dependent
variable is randomized.

The l and h inputs must be Scalar in shape
and of the type Int32, Real, or of a type
that can be converted to Int32 or Real.  The
random numbers generated are in the range of
[l h).

If the l value is greater than the h
value, then the range of random numbers
returned is in the interval (l h].

LOCATION
AdvMath ==> Probability ==>
randomize(x,low,high)

EXAMPLE
randomize(x,0,10) will randomize all the
values of the input container x to real
numbers in the range (0.0 10.0).  That is,
including 0.0, but excluding 10.0.

NOTES
Mappings on input parameters are ignored and
the output has the same mappings as the input
parameter x.

randomize(x) will return the a container
the same size and shape as x, but with the
data randomized in the range (0.0 1.0).

SEE ALSO
random(low,high) and randomSeed(seed).

Random Number and Random Seed 
(from "Help On Features" dialog box).
END HELP
HELP randomSeed(seed)
An object used to set initial values for the
random(low,high) and the
randomize(x,low,high) functions.

USE
Use randomSeed(seed) to input a random seed
entry point for the linear congruential
algorithm used by the random(low,high) and
the randomize(x,low,high) functions.

The seed input s must be Scalar in shape
and of the type Int32 or of a type able to be
converted to Int32.  The return value of this
function is the s seed value.

LOCATION
AdvMath ==> Probability ==> randomSeed(seed)

EXAMPLE
randomSeed(97) initializes the pseudo-random
number algorithm.

NOTES
This function is the same as the Random Seed
object.

SEE ALSO
random(low,high) and randomize(x,low,high).

Random Number and Random Seed
(from "Help On Features" dialog box).
END HELP
HELP re(x)
An object that returns the real part of a
Complex number x.

USE
Use re(x) to extract the real part of a
Complex number x.  x can be any shape and of
type Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  For types Int32,
Real, Coord, and Waveform, the same type with
the same value(s) is returned.  For types
Complex, PComplex, and Spectrum, re(x)
returns a Real container with the value of
the real part of the Complex number.
(PComplex is first converted to Complex.)

LOCATION
Math ==> Complex Parts ==> re(x)

EXAMPLE
re( (1,2) ) returns 1.

re(1,@180), with Trig Mode in Degrees,
returns -1.

NOTES
Mappings are retained in the result.

SEE ALSO
Complex Parts, conj(x), im(x), j(x), mag(x),
phase(x), and Real Parts.

Build Complex and UnBuild Complex 
(from "Help On Features" dialog box).
END HELP
HELP Real Parts
A menu item.

USE
Use Real Parts to access the following
objects which return different real parts of
a container.
* abs(x)
* signof(x)
* ordinal(x)
* round(x)
* floor(x)
* ceil(x)
* intPart(x)
* fracPart(x)

LOCATION
Math ==> Real Parts ==>

SEE ALSO
Complex Parts.
END HELP
HELP recip(x)
An object that returns the reciprocal of the
value of x.

USE
Use recip(x) to generate the reciprocal of a
number; that is, one divided by the number x.
x can be any shape and of type Int32, Real,
Coord, Waveform, Complex, PComplex, or
Spectrum.  For PComplex, the recip(x) is
defined as the reciprocal of the magnitude,
and the phase's sign is reversed.  Complex is
converted to PComplex before the function is
applied.  Int32 arguments will return a Real;
all others will return the same type.  All
will return the same shape as x.

LOCATION
Math ==> Power ==> recip(x)

EXAMPLE
recip( (5, @45) ) will return (0.2, @-45).

recip( (1,-1)) ) will return (0.5, 0.5).

NOTES
Mappings are retained in the result.

SEE ALSO
/ (divide), Power, sq(x), and sqrt(x).
END HELP
HELP rect(x)
An object used to apply a rectangular window
to a time series of values.

USE
Use rect(x) to filter the values in x in the
same manner as convolving x with the spectral
transform of the rectangular function.  This
has the effect of suppressing some of the
noise due to the tails of the input sequence
and the potential discontinuities they
represent when sampling periodic signals.

The input x must be an Array 1D of type
Int32, Real, Coord, or a Waveform, or a
Spectrum.  The same type is returned, except
for Int32, which returns Real.

If x is a Spectrum, it is first converted
to a Waveform using an ifft(x) before the
window is applied.  The result of the window
is then converted back to type Spectrum using
an fft(x).  A Spectrum is returned.

LOCATION
AdvMath ==> Signal Processing ==> rect(x)

EXAMPLE
rect([1 1 1 1 1 1 1 1]) returns 
[1 1 1 1 1 1 1 1].

NOTES
The rect function is represented in the time
domain as 1 for all values,
where 0 <= n <= N -1, where n is the position
(index) in the array, and N is the size of
the array.  The result will be an array of
the same type as x and will have the same
mappings as x (if any).

For a discussion of sidelobe levels and
coherent gains, see:

Ziemer, Tranter, and Fannin, "Signals and
Systems", Macmillan Publishing, New York, NY,
1983.  ISBN #0-02-431650-4.

SEE ALSO
bartlet(x), blackman(x), convolve(a,b),
fft(x), hamming(x), and hanning(x).
END HELP
HELP Regression
A menu item.

USE
Use Regression to fit various types of
regression equations to data.
* linear
* logarithmic
* exponential
* power curve
* polynomial

LOCATION
AdvMath ==> Regression ==>

NOTES
All the Regression objects expect an array of
Coord type for input.  If the input array is
not a Coord type it is converted to Coord.
The conversion to Coord type follows standard
type conversion rules summarized here.  If
the input array is not mapped, then an
implicit x parameter is generated from the
array indices.  That is, the regression must
be done on (x,y) pairs.  The x values will

start at zero and range to n - 1, where n is
the number of data points.  If the input
array is mapped then the generated x data
will range from the low value of the mapping
to the high value of the mapping.

The regression gives as output an array of
data fitted to the equation chosen.  The
number of points of the output array is the
same as in the input data array.  It also
outputs an array of coefficients that
corresponds to the derived constants for each
regression type.  See the individual
regression type to determine to which
equation the data is fitted.  The third
output is the R-squared or "goodness of fit"
coefficient.  It ranges between -1 and 1.  A
fit of -1 or 1 is an exact fit and numbers in
between -1 and 1 represent varying degrees of
goodness of fit.

EXAMPLE
You have an unmapped array input [10 20 30 40
50].  It would be converted to Coord array:

[(0, 10) (1, 20) (2, 30) (3, 40) (4, 50)].

If an input array is the array [1 2 3 4
5], and it is mapped from 1 to 2 (seconds for
instance), it would be converted to Coord
array:

[(1, 1) (1.25, 2) (1.5, 3) (1.75, 4) (2, 5)].

SEE ALSO
meanSmooth(x,numPts), movingAvg(x,numPts),
and polySmooth(x).
END HELP
HELP Relational
A menu item.

USE
Use Relational to access the following
objects which perform relational operations
on two operands:
* ==
* !=
* <
* >
* <=
* >=

LOCATION
Math ==> Relational ==>

NOTES
All of these operations return a scalar Int32
with the value of 0 or 1, which corresponds
to whether the operation is true or false.

It is possible for two operands to not be
relational, that is, the two operands are not
less than, greater than, or equal to each
other.  Examples are Coords with mismatched
mappings and arrays.  For example, [1 2 6] !=
[2 3 4] is true, but the two operands are
neither less than nor greater than each
other, they are simply not equal.  That is,
[1 2 6] < [2 3 4] is false, and [1 2 6] > [2
3 4] is false because each element in the
first array is not < or > respectively to
each element in the second array.

Also note the difference between menu
items under Relational and under Conditional.
Relationals are formulas with output 0 or 1.
Conditionals are If/Then and have two
outputs, of which one activates.

Note that the return value is of type
Int32 and is the same shape as the operands.
This is different than the conditionals such
as == that always return a scalar.

The logical operators are defined for type
Text only in the sense of whether the string
is null or not.  That is, "zoo" AND "" (null
string) is logically false since the second
string is null.  Remember that when comparing
a Text type to a non-string type, the latter
is promoted to a Text type.  This means that
"zoo" AND 0 is true since the Real 0 is
promoted to the string "0" and, since both
strings are non-null, the AND expression is
true, returning 1.

SEE ALSO
AND, == (equal to), > (greater than), >=
(greater than or equal to), < (less than), 
NOT, != (not equal to), OR, and XOR.

Comparator, Conditional, and If/Then 
(from "Help On Features" dialog box).
END HELP
HELP rms(x)
An object used to return the rms (Root Mean
Square) value of the data in the input
container.

USE
Use rms(x) to calculate the Root Mean Square
value of the input container.  The rms value
is defined as the square root of [(The sum of
x^2)/N], where N is the number of the points.

The x input may be of any size and shape
and of the type Int32, Real, Coord, or
Waveform.  For all x input types, a Real
Scalar container is returned.  For Coord
input types, the operation is done on the
dependent variable.

LOCATION
AdvMath ==> Statistics ==> rms(x)

EXAMPLE
Where x is array [1 2 3 4 5 11 12 13 14 34], 
rms(x) returns 13.319159.

NOTES
Mappings on the operand are ignored.

SEE ALSO
max(x), mean(x), median(x), min(x), mode(x),
sdev(x), and vari(x).
END HELP
HELP rotate(x,numElem)
An object used to rotate elements in an
array.

USE
Use rotate(x,numElem) to rotate the elements
of the input array x by n positions.  The x
input may be of any size and shape and of the
type Int32, Real, Coord, Waveform, Complex,
PComplex, Spectrum, or Text.  For all x input
types the same output type is returned.  The
input n must be a scalar Int32 or be able to
be converted to Int32 type.  If the n rotate
value is a positive value, the rotation
direction is down the array (forward).  For
example, if n was 2, then the first element
of the array would end up in the third
position (x[2]) , the second element ends up
in the fourth position (x[3]), and so on.  If
the n value is negative, the array elements
are rotated up the array (backward).

If the rotate number n is larger than the
number of elements in the array, then the
number of places to rotate is calculated by
taking the modulo of the rotate number by the
number of array elements.  For example, if
the input array has 5 elements and you want
to rotate the array 13 places,
the modulo operation (13 MOD 5 = 3)
determines that the array should be rotated 3
places.

LOCATION
AdvMath ==> Array ==> rotate(x,numElem)

EXAMPLE
rotate(x,5) rotates the input array elements
5 positions further to the right in the
array.

rotate(x,15), where the input array x has
15 elements, does nothing because you have
rotated the array back on top of itself.

rotate([1 2 3 4 5], 1) returns [5 1 2 3 4].

NOTES
You might think of the array as a circular
list when using the rotate function, meaning
that the last element in the array is
connected to the first array element.  When
you rotate array elements past the end of the
array, they wrap back around to the top of
the list.  For example, if the array is 10
elements long and you do a rotate(A,5), then
the tenth array element number will end up in
fifth position in the array.

Mappings on input parameters are ignored
and the output has the same mappings as the
input parameter x.

SEE ALSO
concat(x,y) and init(x,y).
END HELP
HELP round(x)
An object that returns the rounded value of
x.

USE
Use round(x) to obtain the rounded value, to
the nearest integer, of a container.  x may
be any shape and of the types Int32, Real,
Coord, or Waveform.  The round(x) function
returns the closest integer (as the same
type) to x.  The dividing line is at 0.5,
which rounds up.

LOCATION
Math ==> Real Parts ==> round(x)

EXAMPLE
round([23.0 23.1 23.9 23.5 (-23.5)]) returns
[23 23 24 24 -23].

NOTES
Mappings are retained in the result.

SEE ALSO
abs(x), ceil(x), Complex Parts, floor(x),
fracPart(x), intPart(x), and Real Parts.
END HELP
HELP sdev(x)
An object used to return the standard
deviation of the data in the input container.

USE
Use sdev(x) to calculate the standard
deviation of the container.

The x input may be of any size and shape
and of the type Int32, Real, Coord, or
Waveform.  For all x input types, a Real
Scalar container is returned.  For Coord
input types, the operation is done on the
dependent variable.

The sdev(x) is defined as the square root
of the vari(x).

LOCATION
AdvMath ==> Statistics ==> sdev(x)

EXAMPLE
Where x is array [1 2 3 4 5 11 12 13 14 34],
sdev(x) returns 9.50789.

NOTES
Mappings on the operand are ignored.

SEE ALSO
max(x), mean(x), median(x), min(x), mode(x),
rms(x), and vari(x).
END HELP
HELP setBit(x,n)
An object that returns x with the nth bit set
to 1.

USE
Use setBit(x,n) to set a particular binary
digit of a container x to 1.  x can be any
shape and of type Int32, Real, Coord, or
Waveform.  If x is not of type Int32, it is
converted to Int32, retaining shape.  The
return value is of type Int32.  n must be a
container which is, or can be converted to,
Int32 and have a value between 0 and 31
inclusive.  n must be either scalar or match
the shape of x.

LOCATION
Math ==> Bitwise ==> setBit(x,n)

EXAMPLE
setBit(8,0) returns 9.

setBit(8.24,0.9) also returns 9.

NOTES
The mappings of the return value are the same
as the x parameter.

The least significant bit is on the right,
and the most significant bit is on the left.

SEE ALSO
bit(x,n), bits(str), Bitwise, and
clearBit(x,n).
END HELP
HELP Signal Processing
A menu item.

USE
Use Signal Processing to access one of
several signal processing functions that can
be applied to one-dimensional arrays (Int32,
Real, Complex, PComplex, Waveform, Spectrum)
for some functions, and lists of
two-dimensional (two field) coordinates.
* fft(x)
* ifft(x)
* convolve(a,b)
* xcorrelate(a,b)
* bartlet(x)
* hamming(x)
* hanning(x)
* blackman(x)
* rect(x)

LOCATION
AdvMath ==> Signal Processing ==>

NOTES
The functions under Signal Processing are
applicable to one-dimensional arrays of
values that represent ordered, equally spaced
data.
END HELP
HELP signof(x)
An object that returns, as an Int32, the sign
of x.

USE
Use signof(x) to obtain the sign of a
container.  x may be any shape and of the
types Int32, Real, Coord, or Waveform.  The
return value will be an Int32 of the same
shape as x, with value(s) of -1, 0, or +1,
depending on whether the x value is negative,
zero, or positive.  If x is negative, -1 is
returned; if x is zero, 0 is returned; if x
is positive then +1 is returned.

LOCATION
Math ==> Real Parts ==> signof(x)

EXAMPLE
signof([23 0 -1]) returns [1 0 -1].

NOTES
Mappings are retained in the result.

SEE ALSO
abs(x), Complex Parts, and mag(x).
END HELP
HELP sin(x)
An object that returns the sine of x.

USE
Use sin(x) to generate the sine of the x
data.  x is assumed to be in the current Trig
Mode units.  x can be any shape and of type
Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  Int32 returns a Real;
all others will return the same type.  All
will return the same shape as x.

LOCATION
Math ==> Trig ==> sin(x)

EXAMPLE
sin([0 PI/2]) returns [0 1] with Trig Mode
set to Radians.

sin((1, @PI)) returns (0.84147, @3.14159)
with Trig Mode set to Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
asin(x), cos(x), tan(x), sinh(x), and Trig.

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP sinh(x)
An object that returns the hyperbolic 
sine of x.

USE
Use sinh(x) to generate the hyperbolic sine
of the x data.  x can be any shape and of
type Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  x is assumed to be in
the current Trig Mode units.  Int32 returns a
Real; all others will return the same type.
All will return the same shape as x.

LOCATION
Math ==> Hyper Trig ==> sinh(x)

EXAMPLE
sinh(1.2) returns 1.509 with Trig Mode set to
Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
asinh(x), cosh(x), Hyper Trig, sin(x), and
tanh(x).

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP sq(x)
An object that returns the square of the
value of x.

USE
Use sq(x) to perform the squaring of a number
x.  x can be any shape and of type Int32,
Real, Coord, Waveform, Complex, PComplex, or
Spectrum.  The sq(x) function multiplies the
value of x times itself.  The return value is
of the same type and shape as x.

LOCATION
Math ==> Power ==> sq(x)

EXAMPLE
sq([1 4]) returns [1 16].

sq((1,2)) returns the complex number
(-3,4).

NOTES
Mappings are retained in the result.

SEE ALSO
Power and sqrt(x).
END HELP
HELP sqrt(x)
An object that returns the square root of the
value of x.

USE
Use sqrt(x) to generate the square root of a
number x.  x can be any shape and of type
Int32, Real, Coord, Waveform, Complex,
PComplex, or Spectrum.  For PComplex, the
sqrt(x) is defined as the square root of the
magnitude and half the phase.  Complex is
converted to PComplex before the function is
applied.  Int32 arguments will return a Real;
all others will return the same type.  All
will return the same shape as x.

LOCATION
Math ==> Power ==> sqrt(x)

EXAMPLE
sqrt( (16, @90) ) will return (4, @45).

sqrt( (1,1) ) will return (1.1, 0.455).

sqrt([4 9 64]) will return [2 3 8].

NOTES
Mappings are retained in the result.

SEE ALSO
cubert(x), ^ (exponent), Power, and sq(x).
END HELP
HELP Statistics
A menu item.

USE
Use the Statistics functions to calculate
these common statistical parameters on data.
* min(x)
* max(x)
* median(x)
* mode(x)
* mean(x)
* sdev(x)
* vari(x)
* rms(x)

LOCATION
AdvMath ==> Statistics ==>

SEE ALSO
Matrix.
END HELP

HELP - (subtract)
An object that performs an arithmetic
subtraction on two operands.

USE

Use - to subtract the value of one container
from another container.  The two containers
may be of type Int32, Real, Coord, Waveform,
Complex, PComplex, or Spectrum.  The two
containers may be any shape.  But if one of
the containers is an array, the other must be
either a scalar or an array of the same size
and shape.  The result is a container of the
highest type, with the same shape as the
operands.

If both operands are of type Coord, they
must have their independent variable(s) match
exactly or an error is returned.  The
subtraction is only performed on the
dependent (last) variable.

LOCATION

Math ==> + - * / ==> -

EXAMPLE

Array minus a scalar: [1 2 3] - 3 
returns [-2 -1 0].

Scalar minus an array: 3 - [1 2 3]
returns [2 1 0].

Two arrays: [4 5 6] - [3 2 1] 
returns [1 3 5].

Two Complex scalars: (2,4) - (1,3)
returns (1,1).

Two Coord scalars: coord(1,3) - coord(1,5) 
returns coord(1,-2).

Two Coord scalars: coord(1,3) -
coord(2,5) returns an error.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Spectrum, Coord, or a
mapped array of any other type), the other
container must be unmapped or have identical
mappings.  The return value will have the
same mappings as the operands; otherwise an
error is returned.

SEE ALSO
+ (add), / (divide), and * (multiply).
END HELP
HELP sum(x)
An object used to sum up (add) all the
elements of the input array.

USE
Use sum(x) to add together all the elements
of the input array.  The x input may be of
any size and shape and of the type Int32,
Real, Coord, Waveform, Coord, Complex,
PComplex, Spectrum, or Text.  For x input of
all types, except Waveform and Spectrum,
output of the same type as the input is
returned.  An input of a Waveform or Coord
returns a Real scalar.  An input of Spectrum
returns a PComplex.

The output of this object (for numeric
types) is the arithmetic sum of all the data
contained in the input container and is a
Scalar.  For Text type input, the output is a
Scalar Text container and contains the
concatenation of all of the Text elements
together to form one large string.

The sum(x) object obeys the same rules for
Text string addition as the dyadic operator
+.

LOCATION
AdvMath ==> Array ==> sum(x)

EXAMPLE
Where x is an array [1 2 3 4], sum(x) 
returns 10.

Where x is an array ["first" "second"
"third"], sum(x) returns "firstsecondthird".

NOTES
Mappings on the operand are ignored.

Note the difference between the
concat(x,y) and sum(x) functions on text
inputs.  The concat(x,y) creates an Array 1D
in all cases.  The sum(x) function will
simply link all the text strings together to
form one large output string.  That is,
concat(x,y), where x is the Scalar Text value
"a" and y is the Scalar Text value "b",
yields the Array 1D ["a","b"].  On the other
hand, sum(["a","b"]) will return the Scalar
container with the Text value of "ab" in it.

SEE ALSO
+ (add), concat(x,y), and prod(x).
END HELP
HELP tan(x)
An object that returns the tangent of x.

USE
Use tan(x) to generate the tangent of the x
data.  x can be any shape and of type Int32,
Real, Coord, Waveform, Complex, PComplex, or
Spectrum.  x is assumed to be in the current
Trig Mode units.  Int32 returns a Real; all
others will return the same type.  All will
return the same shape as x.

LOCATION
Math ==> Trig ==> tan(x)

EXAMPLE
tan([0 45]) returns [0 1] with Trig Mode set
to Degrees.

tan((1, 2)) returns (33.8128m, 1.01479)
with Trig Mode set to Radians.

tan((3, @PI/2)) returns (0.99505,
@1.57079) with Trig Mode set to Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
atan(x), atan2(y,x), cos(x), cot(x), sin(x),
tanh(x), and Trig.

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP tanh(x)
An object that returns the hyperbolic tangent
of x.

USE
Use tanh(x) to generate the hyperbolic
tangent of the x data.  x can be any shape
and of type Int32, Real, Coord, Waveform,
Complex, PComplex, or Spectrum.  x is assumed
to be in the current Trig Mode units.  Int32
returns a Real; all others will return the
same type.  All will return the same shape as
x.

LOCATION
Math ==> Hyper Trig ==> tanh(x)

EXAMPLE
tanh(0.6) returns 0.537 with Trig Mode set to
Radians.

NOTES
Mappings are retained in the result.  Using
Trig Mode set to anything except Radians may
result in accuracy errors beyond the 12th
significant digit.

SEE ALSO
atanh(x), cosh(x), Hyper Trig, sinh(x), and
tan(x).

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP Time & Date
A menu item.

USE
Use Time & Date to access the following
objects which perform date and time
conversions.
* now()
* wday(aDate)
* mday(aDate)
* month(aDate)
* year(aDate)
* dmyToDate(d,m,y)
* hmsToSec(h,m,s)
* hmsToHour(h,m,s)

LOCATION
Math ==> Time & Date ==>

NOTES
The now() and dmyToDate(d,m,y) functions will
output a time as the number of seconds since
the beginning of the Epoch (00:00 hours 
1 January 0001 AD) and is stored in UTC
(Universal Coordinated Time).  That is, a
correction is applied for the time zone
difference between your local time and GMT
(Greenwich Mean Time).  Since the wday(),
mday(), month(), and year() functions expect
a UTC type of time as input (from the now(),
dmyToDate,(), Time Stamp or Date Time
constant), they will remove the correction
before doing the calculation.

The hmsToSec(h,m,s) and hmsToHour(h,m,s)
are only doing conversion to delta (elapsed)
time and do not apply any UTC correction.
You may notice that output from one of these
functions displayed in an alpha display (in
some Time format) is off by the number of
hours between your time zone and UTC.  You
will need to display this information with
the Delta Time:  time selection on the alpha
Time Stamp display on transactions.

SEE ALSO
Time Stamp and To String in Help ==> On
Features.
END HELP
HELP transpose(x)
An object used to calculate the transpose of
a 2D array (a matrix).

USE
Use transpose(x) to return the transpose of a
matrix.  The x input must be of matrix shape
and of the type Int32, Real, Complex,
PComplex, or Text.  For x input of all types,
the same output type is returned.  The matrix
shape required for this function is any
2-Dimensional matrix.  It does not have to be
square.

LOCATION
AdvMath ==> Matrix ==> transpose(x)

EXAMPLE
Where x is a square matrix [ [1 2] [3 4] ],
transpose(x) returns [ [1 3] [2 4] ].

Where x is a matrix [ [1 2 3] [4 5 6] ],
transpose(x) returns [ [1 4] [2 5] [3 6] ].

NOTES
Mappings on the operand are ignored and the
output container has its mappings transposed.

SEE ALSO
det(x), identity(x), and inverse(x).
END HELP
HELP Trig
A menu item.

USE
Use Trig to access the following objects
which perform trigonometric functions on
data.
* sin(x)
* cos(x)
* tan(x)
* cot(x)
* asin(x)
* acos(x)
* atan(x)
* acot(x)
* atan2(y,x)

LOCATION
Math ==> Trig ==>

NOTES
All Trig operations are performed in Radians.
If Trig Mode is set to Degrees, all
containers must be converted from Degrees to
Radians before the function can be performed.
Therefore, for the best performance, use Trig
Mode set to Radians.

SEE ALSO
Hyper Trig.

Trig Mode (from "Help On Features" 
dialog box).
END HELP
HELP vari(x)
An object used to return the variance of the
data in the input container.

USE
Use vari(x) to calculate the variance of the
data in the input container.

The x input may be of any size and shape
and of the type Int32, Real, Coord, or
Waveform.  For all x input types, a Real
Scalar container is returned.  For Coord
input types, the operation is done on the
dependent variable.

The vari(x) is defined as:


[The SUM of (Xi - Xmean)^2] divided by

(numPts - 1)

where Xi is the individual data point,
Xmean is the mean of the data points, and
numPts is the number of elements in the input
array x.

LOCATION
AdvMath ==> Statistics ==> vari(x)

EXAMPLE
Where x is array [1 2 3 4 5 11 12 13 14 34],
vari(x) returns 90.4.

NOTES
Mappings on the operand are ignored.

SEE ALSO
max(x), mean(x), median(x), min(x), mode(x),
rms(x), and sdev(x).
END HELP
HELP wday(aDate)
An object that returns the weekday of the
time x.

USE
Use wday(aDate) to transform the given time x
into a container of the same shape with

value(s) 0 - 6, corresponding to the day of
the week.  The value 0 corresponds to Sunday,
1 to Monday, and so on, with 6 as Saturday.
x must be of type Int32, Real, Coord, or
Waveform any shape.  Int32 returns Real; all
others will return the same type.  All will
return the same shape as x.

LOCATION
Math ==> Time & Date ==> wday(aDate)

EXAMPLE
wday(dmyToDate(25,12,1991)) returns 3, so 
Dec 25, 1991 is a Wednesday.

NOTES
Mappings are retained in the return value.

SEE ALSO
dmyToDate(d,m,y), hmsToHour(h,m,s),
hmsToSec(h,m,s), mday(aDate), month(aDate),
now(), Time & Date, and year(aDate).
END HELP
HELP xcorrelate(a,b)
An object used to cross-correlate two arrays
of data.

USE
Use xcorrelate(a,b) to calculate the discrete
cross-correlation of two 1D arrays a and b.
The result will be an array of the same type
and of size (Na+Nb)-1, where Na is the size
of input array a, and Nb is the size of input
array b.

The input values a and b must be an Array
1D of type Int32, Real, Coord, or Waveform.
The return type is the same as the highest
type of the inputs, except Int32, which
returns Real.  a and b do not have to be the
same size.  The resultant values are not
normalized.

LOCATION
AdvMath ==> Signal Processing ==>
xcorrelate(a,b)

EXAMPLE
xcorrelate([1 2 3 4 5],[3 2 1]) returns 
[1 4 10 16 22 22 15].

NOTES
The inputs a and b must represent equally
spaced data.  In addition, the interval
between any two values of a must be the same
as that between any two values of b.  For two
unmapped arrays, it is assumed that the
interval is always 1.  For mapped arrays, the
interval is (Xmax-Xmin)/N, where Xmax and
Xmin are the mappings and N is the size of
the array.  When one input is mapped and the
other is not, the unmapped input is assumed
to be sampled at the same frequency as the
mapped input.  The resultant values will not
be normalized.

Note that the xcorrelate(a,b) algorithm is
essentially identical to the standard
algorithm for discrete convolution, except
that the second operand is not
sequence-reversed as it is in convolution.

SEE ALSO
convolve(a,b).
END HELP
HELP xlogRamp (numElem,from, thru)
An object that generates a logarithmically
ramped array in the same manner used to
generate x values for coordinate conversions
of log mapped 1D Arrays.

USE
Use xlogRamp(numElem,from,thru) to generate a
Real one-dimensional array of length numElem,
with the values logarithmically ramped from
from to thru.  numElem must be a scalar
container which is, or can be converted to,
Int32 and with a value greater than zero.
from and thru must be scalar containers which
are, or can be converted to, Real.  If from
is less than thru the ramping is positive;
otherwise it automatically ramps negatively.
Both from and thru must have values greater
than zero.

LOCATION
Math ==> Generate ==>
xlogRamp(numElem,from,thru)

EXAMPLE
xlogRamp(3, 1, 100) returns a 1D Array with
values [1 10 100].

NOTES
The return value has no mappings.

The algorithm for generating values is:

Y[I]=exp10(log10(from)+I*((log10(thru)
  -log10(from))/numElem))

for I=0..numElem-1

This has the effect that the last element
in the resultant array has a value which is
less than thru by:

exp10(log10(thru)-log10(from)/numElem).

SEE ALSO
Alloc Real, logRamp(numElem,from,thru), and
xramp(numElem,from,thru).
END HELP
HELP XOR
An object that performs a logical exclusive
OR operation on two operands.

USE
Use XOR to determine whether one and only one
of the value(s) of two containers is
logically true (non-zero).  The two
containers may be of any type and of any
shape.  If one of the containers is an array,
the other must be either a scalar or an array
of the same size and shape.  The result is an
Int32 of the same shape as the operands, with
value(s) 0 or 1.  If either operand is
non-zero, but not both, the value of the XOR
operation is 1; otherwise the value is 0.

If both operands are of type Coord, they
must have their independent variable(s) match
exactly or an error is returned.  Only the
dependent (last) variable is considered for
the XOR operation.

For Complex, PComplex, and Spectrum
containers, the value of the operand is true
if either part is non-zero.  Text is true if
non-null.  Enums are converted to Text for
the operation.

LOCATION
Math ==> Logical ==> XOR

EXAMPLE
A scalar and an array:  3 XOR [3 3 3] returns
[0 0 0].

A scalar and an array:  3 XOR [-3 0 3]
returns [0 1 0].

Two arrays:  [1 2 3] XOR [0 1 (-1)]
returns [1 0 0].

Two PComplex scalars:  (1,@90) XOR (1,@85)
returns 0.

Two Complex scalars:  (0,0) XOR (0,1)
returns 1.

Two Complex scalars:  (0,1) XOR (1,0)
returns 0.

Two Complex scalars:  (0,0) XOR (0,0)
returns 0.

Two Coord scalars:  coord(1,3) XOR
coord(1,5) returns 0.

Two Coord scalars:  coord(1,3) XOR
coord(2,3) returns an error.

A Text scalar and a scalar number:  "too"
XOR 0 returns 1.

A Text scalar and a scalar number:  "" XOR
0 returns 1 because the real 0 is promoted to
"0", which is a non-null string.

NOTES
If either of the containers is mapped (that
is, of type Waveform, Spectrum, Coord, or a
mapped array of any other type), the other
container must be unmapped or have identical
mappings.  The return value will have the
same mappings as the operands; otherwise an
error is returned.

Note that the If/Then device requires the
expression(s) inside it to evaluate to either
a scalar or an array, which is either all
zeros or all ones.

SEE ALSO
AND, NOT, OR, and Relational.

Conditional and If/Then in Help ==> On
Features.
END HELP
HELP xramp(numElem, from,thru)
An object that generates a linearly ramped
array in the same manner used to generate x
values for coordinate conversions of mapped
1D Arrays (for example, Waveform).

USE
Use xramp(numElem,from,thru) to generate a
Real one-dimensional array of length numElem,
with the values linearly ramped from from to
thru.  numElem must be a scalar container
that is, or can be converted to, Int32 and
with a value greater than zero.  from and
thru must be scalar containers that are, or
can be converted to, Real.

If from is less than thru, the ramping is
positive; otherwise it automatically ramps
negatively.

LOCATION
Math ==> Generate ==>
xramp(numElem,from,thru)

EXAMPLE
xramp(3, 0.5, 0) returns a one-dimensional
array with values [0.5 0.25 0].

xramp(5, 2, 10) returns a one-dimensional
array with values [2 4 6 8 10].

NOTES
The return value has no mappings.

The algorithm for generating values is:

Y[I] = from + I*(thru-from/numElem)

for I=0..numElem-1

This has the effect that the last element
in the resultant array has a value which is
less than thru by the size of the sampling
interval:  (thru-from)/numElem.

SEE ALSO
Alloc Real, ramp(numElem,from,thru), and
xlogRamp(numElem,from,thru).
END HELP
HELP y0(x)
An object used to calculate the Bessel
function of x of the second kind of order
zero.

USE
Use y0(x) to find the Bessel function of x of
the second kind of order zero.  The x input
may be of any size and shape and of the type
Int32, Real, Coord, or Waveform.  For x input
of all types, the same output type is
returned, except for Int32 which returns a
Real type.  For Coord input types, the
operation is done on the dependent variable.

LOCATION
AdvMath ==> Bessel ==> y0(x)

EXAMPLE
y0(2) returns 0.510375672649745.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

The value of x must be positive.

SEE ALSO
Ai(x), Bi(x), j0(x), j1(x), jn(x,n), y1(x),
and yn(x,n).
END HELP
HELP y1(x)
An object used to calculate the Bessel
function of x of the second kind of order
one.

USE
Use y1(x) to find the Bessel function of x of
the second kind of order one.  The x input
may be of any size and shape and of the type
Int32, Real, Coord, or Waveform.  For x input
of all types, the same output type is
returned, except for Int32 which returns a
Real type.  For Coord input types, the
operation is done on the dependent variable.

LOCATION
AdvMath ==> Bessel ==> y1(x)

EXAMPLE
y1(9) returns the value 0.104314575196715.

NOTES
Mappings on the operand are ignored and the
output container has the same mappings as the
input.

The value of x must be positive.

SEE ALSO
Ai(x), Bi(x), j0(x), j1(x), jn(x,n), y0(x),
and yn(x,n).
END HELP
HELP year(aDate)
An object that returns the year of the time
x.

USE
Use year(aDate) to transform the given time x
into a container of the same shape with the
value of the year of the time x.  x must be
an Int32, Real, Coord, or Waveform any shape.
Int32 returns Real; all others will return
the same type.  All will return the same
shape as x.

LOCATION
Math ==> Time & Date ==> year(aDate)

EXAMPLE
year(dmyToDate(25,12,1991)) returns 1991.

NOTES
Mappings are retained in the return value.

SEE ALSO
dmyToDate(d,m,y), hmsToHour(h,m,s),
hmsToSec(h,m,s), mday(aDate), now(),
month(aDate), Time & Date, and wday(aDate).
END HELP
HELP yn(x,n)
An object used to calculate the Bessel
function of x of the second kind of order n.

USE
Use yn(x,n) to find the Bessel function of x
of the second kind of order n.  The x input
may be of any size and shape and of the type
Int32, Real, Coord, or Waveform.  For x input
of all types, the same output type is
returned, except for Int32 which returns a
Real type.  For Coord input types, the
operation is done on the dependent variable.

The n parameter must be of Int32 type or
be able to be converted to Int32.  The n
parameter also has to be a Scalar in shape or
the same shape as x.

LOCATION
AdvMath ==> Bessel ==> yn(x,n)

EXAMPLE
yn(10,4) returns -0.144949511868093.

NOTES
If both of the inputs are mapped, then the
mappings must be the same.  The return value
has the same mappings as the input if either
input is mapped.  If neither of the inputs is
mapped, then the output is unmapped.

The value of x must be positive.

SEE ALSO
Ai(x), Bi(x), j0(x), j1(x), jn(x,n), y0(x),
and y1(x).
