Extracting periodicity with Fast Fourier Transform

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 3K views
Ebert87
Messages
2
Reaction score
0
Hello all,

I want to extract the period out of a complex discrete signal.

Currently I have the Matlabscript of the attachement.

However, the values I get out of this script are not correct. There is some kind of systematic bias in it.

I think it has something to do with index * samplefrequency.

Anyone an idea what could be wrong?

Thanks in advance!
 

Attachments

  • matlab script.jpg
    matlab script.jpg
    28.7 KB · Views: 536
Physics news on Phys.org
Right, you should divide by sample frequency. Period and frequency have inverse relation.
 
Hassan2 said:
Right, you should divide by sample frequency. Period and frequency have inverse relation.

Thanks, I tried it, but now the values are extremely big. Maybe I am using the y-axis value of the frequency domain graph, instead of the x-axis value (which says something about thefrequency of the original signal, right?)?

Getting confused now :confused:
 
What are the values of index and Samplefreq?

I think you should use this:

Period=(Length of the sequence)*dt/index