Log10 (source), Syntax, Log10 function example – Campbell Scientific CR9000X Measurement and Control System User Manual
Page 310: Maxspa(dest, swath, source), Maxspa parameters

Section 8. Processing and Math Instructions
Log Function Example
'Calculates the value of e, then uses 'the Log function to calculate 'the natural 'logarithm of e
to the 1
rst
, 2
nd
, and 3
rd
powers.
Dim I, M
'Declare variables.
BeginProg
M = Exp(1)
For I = 1 To 3
'Do three times.
M =
LOG
(Exp(1) ^ I)
Next I
EndProg
LOG10 (source)
The LOG10 function returns the base 10 logarithm of a number.
Syntax
LOG10( source )
Remarks
The Number argument can be any valid numeric expression that has a value
greater than 0. You can calculate base-n logarithms for any number x by
dividing the logarithm base 10 of x by the logarithm base 10 of n as follows:
LOGN( x ) = LOG10( x ) / LOG10( n )
LOG10 Function Example
This example uses the LOG10 instruction to calculate the log base 2 of 1000.
Dim LOG2_1000
'Declare variables.
LOG2_1000 =
LOG10
(1000)/
LOG10
(2)
MaxSpa(Dest, Swath, Source)
The MaxSpa function finds the maximum value from a specified swath of elements
of an array.
Syntax
MaxSpa(
Dest, Swath, Source
)
Remarks
Finds the maximum value in the specified swath of elements of an array and stores
the max value into the Dest array. The location of the maximum value is stored in
the sequential element in the Source array, The Source is specified as a particular
element in an array (e.g., Temp(3)) to start the search through the number of
elements specified by Swath.
NANs are not included in the processing of the
Spatial Maximum.
Parameter
Enter
MAXSPA PARAMETERS
Dest
Array
The array element in which to store the maximum value. An array name with empty brackets (e.g.
Dest()), specifies to load the maximum value in the first element of the Dest array. The next element in
the Dest() array will be loaded with the location in the source array, starting with the element defined in
the Source argument as the first location, of the maximum.
Swath
Constant
The number of values of the source array in which to search for the maximum.
Source
Array
The element of the source array in which to start looking for the max. If the TC(6) were entered for the
source, and 3 for the Swath, then TC(6), TC(7), and TC(8) elements would be tested for the maximum.
MinSpa & MaxSpa Function Example
'This example finds the max and min values of the five elements Temp(6) 'through Temp(10) and stores the maximum
Temp in MaxTemp(3) and the location in the array, starting 'with Temp 6 as the basis point, in MaxTemp(4).
MAXSPA
(MaxTemp(3), 5, Temp(6))
MINSPA
(MinTemp(3), 5, Temp(6))
8-24