• Dennis Francis's avatar
    tdf#74664 : Adds FOURIER() formula · 32d9f7a6
    Dennis Francis yazdı
    FOURIER(Array, GroupedByColumns, Inverse, Polar)
    is a matrix formula that computes discrete Fourier transform[DFT]
    of input array(first argument) via a radix-2, decimation-in-time
    fast Fourier transform algorithm.
    
    Unit test for this is coming up in a new commit.
    
    The data in input array(first argument) can be :-
    
    1) grouped by columns (needs to be indicated by flag GroupedByColumns = TRUE)
       In this case the array can contain 1 or 2 columns, where the first column
       contains the real part of input series and second column if present contains
       the imaginary part of the input series. If there is only 1 column, the input
       series is treated as purely real. If the number of rows is not a power of 2,
       zeroes are appended to the input series internally to make the series length
       equal to the next nearest power of 2.
    
    2) grouped by rows (needs to be indicated by flag GroupedByColumns = FALSE)
       In this case the array can contain 1 or 2 rows, where the first row
       contains the real part of input series and second row if present contains
       the imaginary part of the input series. If there is only 1 row, the input
       series is treated as purely real. If the number of columns is not a power of 2,
       zeroes are appended to the input series internally to make the series length
       equal to the next nearest power of 2.
    
    The third argument "Inverse" is a boolean flag to indicate whether an inverse
    DFT needs to be computed. This argument is optional and the default value is
    FALSE.
    
    The fourth argument Polar is a boolean flag to indicate whether the final output
    needs to be in polar coordinates. This argument is optional and the default value
    is FALSE.
    
    The result of DFT consists of two columns - first column contains the real parts (or
    the magnitudes if Polar=TRUE) and second column contains the imaginary parts (or
    the phases if Polar=TRUE).
    
    Implementation:
    
    A fairly straighforward non-recursive implementation of radix-2 FFT algorithm is
    written from scratch.
    
    Reference:
    
    Heckbert, P., 1995. Fourier transforms and the fast Fourier transform (FFT) algorithm.
    Computer Graphics, 2, pp.15-463.
    
    The normalization factor used in DFT / and inverse DFT in this implementation matches that
    of fft() and ifft() functions of Matlab/Octave. It also matches the one used in Wikipedia
    article on DFT: https://en.wikipedia.org/wiki/Discrete_Fourier_transform.
    
    Change-Id: If4a40a6ef62bce1f03c589ae5357b2049f66fe64
    Reviewed-on: https://gerrit.libreoffice.org/67938
    Tested-by: Jenkins
    Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
    32d9f7a6
Adı
Son kayıt (commit)
Son güncelleme
..
bitmaps.hlst Loading commit data...
core_resource.hrc Loading commit data...
core_resource.hxx Loading commit data...
strings.hrc Loading commit data...