get_fx {fftab} | R Documentation |
Extract Fourier Coefficients and Components
Description
These utility functions extract specific components from a fftab
object.
get_fx
retrieves the raw Fourier coefficients, while get_fx_norm
ensures the
coefficients are either normalized or not normalized based on the norm
parameter.
Usage
get_fx(x)
get_fx_norm(x, norm = FALSE)
get_re(x)
get_im(x)
get_mod(x)
get_arg(x)
Arguments
x |
A |
norm |
Logical. If |
Details
-
get_fx
: Returns coefficients as they are stored in thefftab
object. -
get_fx_norm
: Adjusts coefficients if they are not in the desired normalization state. -
get_re
,get_im
: Extract real and imaginary components. -
get_mod
,get_arg
: Compute magnitude and phase of coefficients.
Value
The requested components:
-
get_fx
: A complex vector of raw Fourier coefficients (fx
) as stored in the object. -
get_fx_norm
: A complex vector of Fourier coefficients, explicitly normalized or non-normalized based on thenorm
parameter. -
get_re
: A numeric vector of real parts (re
). -
get_im
: A numeric vector of imaginary parts (im
). -
get_mod
: A numeric vector of magnitudes (mod
). -
get_arg
: A numeric vector of phase angles (arg
), in radians.
See Also
to_cplx()
, to_rect()
, to_polr()
Examples
fftab(c(1, 0, -1, 0)) |> get_fx()
fftab(c(1, 0, -1, 0)) |> get_fx_norm(norm = TRUE)
fftab(c(1, 0, -1, 0)) |> get_re()
fftab(c(1, 0, -1, 0)) |> get_im()
fftab(c(1, 0, -1, 0)) |> get_mod()
fftab(c(1, 0, -1, 0)) |> get_arg()