sig_fft: Compute the one-dimensional discrete Fourier Transform.

View source: R/signal_helpers.R

sig_fftR Documentation

Compute the one-dimensional discrete Fourier Transform.

Description

Computes the Discrete Fourier Transform (DFT) of an array with a fast algorithm, the “Fast Fourier Transform” (FFT). Wrapper of stats::fft with an extra argument similar to python's numpy.fft.fft.

Usage

sig_fft(x, n = NULL)

Arguments

x

A vector

n

Length of the transformed axis of the output. If n is smaller than the length of the input, the input is cropped. If it is larger, the input is padded with zeros. If n is not given, the length of the input along the axis specified by axis is used.

Examples

a <- c(0, 4, 0, 0)
sig_fft(a)

bnicenboim/eeguana documentation built on March 16, 2024, 7:21 a.m.