Find FFT and summation in 4D matrix
1 次查看(过去 30 天)
显示 更早的评论
Hello,
Please, I have F(8*409600*3) matrix. I want to reshape it into B(8*512*3*800) matrix (each row should divide into 800 parts) then I have to find Fast Fourier transform(FFT) for each (8*512) rows and multiply it by its conjugate and divide by a constant after that I have to find summation of elements of each row in fourth dimension and average them by the number of slices within the fourth dimension (800). I mean
(B(1,1,1,1) +B(1,1,1,2)+B(1,1,1,3)……+B(1,1,1,800))/800
(B(1,2,1,1) +B(1,2,1,2)+B(1,2,1,3)……+B(1,2,1,800))/800
And so on for each row.
I used below code it seems work but does not give a correct result.
F=rand(8,409600,3);
B=reshape(F,8,512,3,[]);
C1=fft(B, [],2);
C2=C1.*conj(C1);
C3=C2/(3000);
C4=sum(C3,4)/800;
Thanks
2 个评论
Adam
2016-7-18
You say you have to find the FFT for each (8*512) rows. After your reshape to B you are doing the FFT on dimension 2 which is going to do the FFT in 3d along the 512 dimension. Whether or not this is what you want I don't know.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!