about computing fft in wavenumber domain

I have signal distributed in space domain (x,y,z). and I want to calculate its wavenumber doain for (x,ky,z) domain. how can I carry out this task(without using a do loop over all of y values)?

 Réponse acceptée

David Young
David Young le 7 Nov 2011
Use
fft(data, [], 2)

5 commentaires

smabtahi
smabtahi le 7 Nov 2011
Thanks David
Do you mean that with the mentioned command , second column of "data" assumed as "y" and the "[]" contains array of wavenumbers?
Walter Roberson
Walter Roberson le 7 Nov 2011
No, the [] indicates that the default number of fft points is to be used, and the 2 means to work across rows rather than down columns.
This syntax is the third one listed in the possibilities in the fft reference documentation, http://www.mathworks.com/help/techdoc/ref/fft.html
smabtahi
smabtahi le 7 Nov 2011
Thanks Walter
I have read the document, but it says only that :
Y = fft(X,[],dim) and Y = fft(X,n,dim) applies the FFT operation across the dimension dim.
then it means that "Dim" refers to a determined coordination direction, and even may be more than 2 and it doesn't refer to specify working with rows rather than columns.
please tell me if I got the point true or not.
Walter Roberson
Walter Roberson le 7 Nov 2011
The dimension refers to the matrix dimension index in standard matlab order -- columns first, rows second, "pages" third, unnamed entities for the higher dimensions. It is logically equivalent to using ":" as the dim'th element in indexing the vector with the other elements held constant for any one operation.
It is the value 2 that indicates working across rows, rather than just the presence of a parameter at that location.
smabtahi
smabtahi le 7 Nov 2011
Thank you very much.
your explanation was really helpful.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by