How do I do the fourier transform of a data array?
Ältere Kommentare anzeigen
I have been trying to do the fourier transform of a reference signal and of a row of signals, but the results I am getting are not the way they should be. What am I doing wrong?
I have got a two data arrays, the first is a reference signal and the second are 240 individual main signals (obtained over a period of 60 seconds). These signal are THz signals and their Fourier Transform is expected to take a certain shape, as shown in the the figure below (left shows the signal and right shows the fourier of the signal):

Fig.1 - Stereotypical FFT of a THz signal.
Each signal (the reference and the 240 main data signals) is composed of 1496 points.
The reference is : 1 x 1496;
The main signal is : 1496 x 240 (I was too lazy to make a transpose of this, but it can be easily done).
To get the fourier transform of said signal I have written the following:
ref_ft = fft(ref_clean); %ref_clean is the reference signal 1 x 1496;
for p=1:240
data_ft(:,p)=fft(data_clean(:,p)); %data clean are the main 240 signals, 1496 x 240 ;
end
plot(freq, ref_clean); %plotting them against frequency
plot(freq, data_clean)

Fig. 2 - My FFT of the reference signal
This, in no shape of form looks like examples shown in Fig. 1. What could I be possibly doing wrong? Is it potentially the shape of my data? I don't think it is because my reference is a simple shape and I haven't had to put it through a for loop.
Any help would be deeply appreciated.
I have attached the data files in case anyone finds something weird about them.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!