Help interpreting Fast Fourier Transform.
Mostrar comentarios más antiguos
I followed this video : https://www.youtube.com/watch?v=cw9eoSzln_k&ab_channel=Study%26Tutor
to perform a FFT on data I collected that reperesented voltage vs time. The data can be found here https://mega.nz/file/JX81BI5L#ivW7WgkKpxjhqMBXC2nUYuc8ykC_sXahZuAu1UaMc6w
The code I used is as follows :
t = readmatrix('fftpoop.xlsx');
>> dt = 16.788
dt = 16.7880
>> fs = 1/dt;
>> plot(t(1:16789,2))
>> %time
>> t = t(1:16789,2);
>> t_f = fft(t);
>> m = length(t_f);
>> freq = (-m/2:(m/2-1))*fs/(m-1);
>> plot(freq,fftshift(abs(t_f)))
And i recieved a plot that looks like this :

I manually counted the average time between peaks from the original time data to be .37s. I used this time to calculate the a distance, D = 8.3*10^-7 m/s * .37 s = 307 nm* (2) = 614 nm. This is very close to the value I was expecting (633 nm).
I believe that If I find the frequency from this fft that has the highest peak, then I can use that to use the equation, time = 2pi/freq and verify my time is correct / make my time variable more accurate, and get a better value for D calculated above
I tried using the x value centered at 0 and the next highest peak from the 0 peak in the above graph as my frequency, but they all produce numbers wayyyy bigger from the expected distance.
Am I using this data correctly?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Spectral Measurements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

