ft_inv | R Documentation |
The function returns a 2 column data frame with the first column named 't' containing the time components,
and the second column named 'Y' containing the complex valued signal components of the inverted FFT.
ft_inv(wf, fy)
ft_inv(wf, fy, w = F)
ft_inv(wf, fy, w = F, t_start = 10)
wf |
The discretized w-space vector of the fourier transsform is intended for invertion. |
fy |
The complex fourier transformed samples intended for inverse fourier transformation. |
w |
A binary bit, when set to TRUE, Ts = 2*pi/(N*ws). |
t_start |
The first element of the vector t, t[1] |
Chitran Ghosal
library(StatsChitran) #call library
X <- seq(-10*pi, 10*pi, by=0.001) #build the X-vector
Y <- sin(3*X) #build the sinusoid Y-vector which oscillates 3 times within 2*pi
df <- ft(X, Y, w = T, set.nyquist = T) #build the fourier transform
df_back <- ft_inv(df$wf, df$fy, w = T, t_start=-10*pi) #calculate the inverse fourier transform
subplot(c(2,1)) #divide the graphics screen
plot(df$wf, abs(df$fy), type='b', col = 'red', xlim = c(-5,5), main = 'Fourier Transform') #plot the fourier transform
plot(df_back$t, df_back$Y, xlim=c(0, 2*pi), type='l', main ='Inverse Fourier Transform', col = 'red') #plot the inverse function
abline(v=c(0, 2*pi), h=0) #build global geometric markers
abline(v = c(1, 2)*2*pi/3, col='blue') #build local geometric markers
subplot(c(1,1)) #default to original graphics screen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.