NAME

gen3 - fill a function table with numbers from a binary data file


SYNOPSIS

makegen(table_number, 3, table_size, file_number)


DESCRIPTION

Call makegen from a script with a function_type of 3 to fill a function table with arbitrary floating-point numbers read from a binary data file.

NOTE: Much of the functionality of gen 3 has been duplicated and extended by the "datafile" table-type in maketable and the new (in RTcmix 4.0) table-handle scheme.


ARGUMENTS

table_number
The numeric ID for the function table.

Unlike some other function table types, gen 3 does not rescale the table values to fit between -1 and 1.

table_size
The size of the function table: how many values it stores. If table_size is less than the number of values in the data file, then gen 3 stores only the first table_size values; it ignores the rest.

file_number
Identifies a binary data file already opened by the infile script command. This file is assumed to contain a stream of 32-bit floating-point numbers.


EXAMPLES

   file_num = 1
   infile("myfile", file_num)
   makegen(2, 3, 20, file_num)

Table number 2 will contain 20 values read from the binary data file, ``myfile.'' If that file contains fewer than 20 values, then the table will be zero-padded.


SEE ALSO

makegen, gen2, infile