http://www.mathworks.com/matlabcentral/newsreader/view_thread/328584
MATLAB Central Newsreader  how use from fft in three dimensional domain
Feed for thread: how use from fft in three dimensional domain
enus
©19942014 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Thu, 25 Apr 2013 12:44:10 +0000
how use from fft in three dimensional domain
http://www.mathworks.com/matlabcentral/newsreader/view_thread/328584#903185
ghasem
Hi.<br>
I have several 4 dimensional arrays in spacetime domain (named as : aux_a,aux_b,...).<br>
in each of them,forth dimension is time and three other dimensions are spatial coordinates.<br>
I want to calculate their DFT for a given frequency interval .but I don't know how implement fftn or faster method in this case.<br>
I wrote following code:<br>
======================<br>
n = 10000; % number of time steps.<br>
dt = 5e3; % sampling time interval<br>
freq = (50:5:300); % desired frequency interval<br>
% aux_a,b are a predetermined 4d arrays in spacetime domain<br>
% [ you suppose aux_a,b,... =rand(3,4,5,n) ,...]<br>
a = zeros(3,4,5,length(freq));<br>
b = zeros(3,4,5,length(freq));<br>
for m = 1:n<br>
for k = 1:length(freq)<br>
exp_h = exp(1j * freq( k )* m * dt);<br>
a(:,:,:,f) = a(:,:,:,f) + exp_h * aux_a(:,:,:,m);<br>
b(:,:,:,f) = b(:,:,:,f) + exp_h * aux_b(:,:,:,m);<br>
...<br>
end<br>
end<br>
======================<br>
now suppose I have 22 other 4 dimensional arrays like as b and c in above.and I have to calculate their fourier transform like as above.<br>
this code is very slow.I want to use from fftn or a better method.<br>
but I don't know how implement fftn for this problem.<br>
is there anyone who help me?<br>
thanks...