Skip to contents

The get_rect and get_polr functions extract specific components from a fftab object, representing the Fourier coefficients in either rectangular or polar form.

Usage

get_rect(x)

get_polr(x)

Arguments

x

A matrix object containing FFT results.

Value

  • get_rect: A matrix with two columns:

    • re: The real part of the coefficients.

    • im: The imaginary part of the coefficients.

  • get_polr: A matrix with two columns:

    • mod: The magnitude of the coefficients.

    • arg: The phase angle of the coefficients, in radians.

Examples

fftab(c(1, 0, -1, 0)) |> get_rect()
#>      re im
#> [1,]  0  0
#> [2,]  2  0
#> [3,]  0  0
#> [4,]  2  0

fftab(c(1, 0, -1, 0)) |> get_polr()
#>      mod arg
#> [1,]   0   0
#> [2,]   2   0
#> [3,]   0   0
#> [4,]   2   0