example code:
fft2(W); % W has spatial coordinate values in the first row and time values down each column
plot(abs(W));
No. Don't put the spatial coordinates in the first row. Their only
use is in calculating the wave number which is done outside of the
FFT, just like frequency is.
Each column should be the time series at each spatial location
(equispaced).
You should have a constant interval in time, dt, down the columns and
an equal interval in space, dx, across the columns.
Then, if there are N rows, frequency is w=2*pi*(0:N/2-1)/(N*dt) and if
there are M columns wave number is k=2*pi*(0:M/2-1)/(M*dx).
i thought that the fft of the time domain gives the frequency domain. and the fft of the spatial domain gives the wavenumber domain. so if i organize the matrix so that going down each column is a time series, and each column is the time series for a different x coordinate and take a fft2 of the matrix, i should get wavenumber vs. frequency when plotted.
Correct.
> so if i organize the matrix so that going down each column is a time series, and each column is the time series for a different x coordinate and take a fft2 of the matrix, i should get wavenumber vs. frequency when plotted.
Sounds about right.
Your first post could be interpreted such that you include
the spatial positions of your sensors as well as the sampling
times of your snapshots in the data. Do *not* include any of
this book-keeping information in the lump of data that you
feed to the DFT, and you will be fine.
Rune