@r, array of real data
@i, array of imaginary data
@c, array of complex data. is @r and @i
@a, buffer A
@b, buffer B
@w, window buffer
@l, baseline buffer
Sub arrays are depicted by the array indicator followed by a range of data. For example, @c[1..4] are the first 4 elements of the real and of the imaginary array's, and @a[1] is the first element of buffer A.
$test = sizeof( @R )this is the same as ? si Example 2:
$test = sizeof( @R[5..8] )Returns 4 in the variable test.
RV @R[1..8] Before reverse: 1 2 3 4 5 6 7 8 9 10 ... After reverse: 8 7 6 5 4 3 2 1 9 10 ...
Swap the 2x2 bytes for <number> or for all <array>
elements. Thus, each float with byte order 1234 will have byte order 2143
instead (For I/O conversion).
Swap the 4 bytes for <number> or for all <array> elements. Thus, each float with byte order 1234 will have byte order 4321 instead (For I/O conversion).Example 1:
SWAP4 @rSwap 4 bytes in all elements of the array of real data Example 2:
$result = swap4 123.45Stores the result of the swap4 operation in variable <result>
Convert one integer number to float or array of integers to array of floats (For I/O conversion) Example 1:
$file1 = open "filename", "r" $num = read $file1 close $file1 $num = i2f $num println $numRead one integer from file1 and convert it to a float. Example 2:
$file2 = open "filename", "r" si 1024 @r = read $file2 close $file2 i2f @rRead 1024 integers in array @r and convert these integers to floats.
Convert one float to integer or array of floats to array of integers (For I/O conversion).
Convert an array of complex data into two arrays of real and imaginary data. The size of the complex array is two times the size of the new arrays.
Complex array: 1 2 3 4 5 6 7 8 9 10 .... Real array: 1 3 5 7 9 ... Imaginary array: 2 4 6 8 10 ...Example:
si 1024 @r[1..1024] = read $file1 # read 1024 data points c2ri @r, @r, @i # convert into 2 arrays # of 512 points si 512 # set new size rw 1 # Write record
MAX ( <array> }Returns the maximum value in array <array>
Example 1:Example 2:$value = max(@r)$value = max(@i[44..99])
Min ( <array> }Returns the minimum value in array <array>