nextn, nextnevn#
Purpose#
Returns allowable matrix dimensions for computing FFT’s.
Format#
Examples#
n = nextn(456);
The code above will assign n to be equal to 480.
Remarks#
The Temperton FFT routines (see table below) can handle any matrix whose dimensions can be expressed as:
\[2p \times 3q \times 5r \times 7s\]
where p, q and r are nonnegative integers and s is equal to 0 or 1.
The one restriction is that the vector length or matrix column size must be even (p must be positive) when computing RFFT’s.
The fftn()
, etc., functions will automatically pad matrices (with zeros) to the next allowable dimensions. The functions nextn()
and nextnevn()
are provided in case you want to check or fix matrix sizes yourself.
Use the following table to determine what to call for a given function and matrix:
FFT |
Vector |
Matrix |
Matrix |
---|---|---|---|
Function |
Length |
Rows |
Columns |
Source#
optim.src