NAME

copytable - copy a table associated with a table-handle and optionally resize it with or without interpolation


SYNOPSIS

table = copytable(table_handle[, newsize[, interp_type]])

Parameters inside the [brackets] are optional.


DESCRIPTION

copytable makes a copy of a table associated with table_handle. Using the optional newsize argument, the copied table may be larger or smaller than the original table. The second optional argument, interp_type determines if the resized table uses interpolation or simply truncates the values to determine the values in the new table.


ARGUMENTS
table_handle
The table-handle identifier for the table to be copied and possibly resized

newsize
An optional value setting the size of the copied table. If newsize is used, then the interp_type should also be specified.

interp_type
If newsize is specified, then the interp_type can also be set. This is a string, identical to two of the interp options for maketable: The default is interp.


RETURN VALUE

Returns a table-handle for the new, copied and (possibly) resized table


EXAMPLES
   table = maketable("wave", 4000, 1.0, 0.2, 0.1)
   newtable = copytable(table, 1000, "interp")

newtable will be associated with a new table that will contain the same waveform defined in the first maketable, except that it will only fill 1000 elements instead of 4000. The new values will be determined by linear interpolation if they don't align with the values taken from the original 4000-point table.


SEE ALSO

maketable, modtable, makefilter, makeconverter, plottable, dumptable, tablelen, mul, div, sub, add