Computes the 1D, 2D or 3D inverse Fast Fourier Transform (FFT) of a matrix. In the 1D case the transform is given by
$$E_x[m]=\text{invfft}(E_w)=\frac{1}{N}\sum_{n1}^NE_w[n]. e^{(\frac{2\pi i}{N})(n1)(m1)} $$
The inverse FFT, FFT and all related functions have an option (option 1 below) that controls the format used to store the frequency domain data. When working with spectral data it is not possible to switch between formats; there are no functions to convert between formats. This implies that if you use option1=n to produce a spectrum with fft, then you must also use option1=n if you want to pass that same spectral data to invfft. Similarly, if you use option1=n for fft, then you also need to use option1=n with fftw to get the proper frequency vector corresponding to your spectrum. invfft and fftk work in the same way.
========== PRODUCTS TAG ==========
FDTD STACK MODE DGTD CHARGE HEAT FEEM INTERCONNECT
========== PRODUCTS TAG ==========
Syntax 
Description 

out = invfft(Ew); 
Returns the inverse fast Fourier transform of Ew. Ew can 1D,2D or 3D. 
out = invfft(Ew,option1,option2); 
option1 This option controls the format used to store the frequency domain data. The options are:
option2 This option is either a 1, 2 or 3 element vector depending on whether Ex is 1D, 2D or 3D. For each dimension, specify a value of either 0, 1 or N to obtain the desired 0 padding options.

Example
This example shows that x2=invfft(fft(x)) returns x. x2 will only be equal to x if the standard fft without zero padding is used. In the plot command, 1 is added to x2 so that both lines are visible in the plot.
t=linspace(0,100,1000);
x=sin(t)+sin(t/10);
k=fft(x,1,0);
x2=invfft(k,1,0);
plot(t,x,x2+1,"t");
See Also