Find FFT and summation in 4D matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Adam
am 18 Jul. 2016
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.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!