11-01-2021 09:12 AM
Hello all,
I am trying to get the frequency of a changing value. I am trying to use the FFT function. And I cannot seem to get it right. I am including a picture. It is a changing double value. I have loaded it into an array then put it into the FFT function. I am not getting a thing.
Any help would be greatly appreciated. I have spent the last few days looking for a solution. So now I am coming to you all.
Thank you for your time,
Corey
11-01-2021 09:42 AM
11-01-2021 10:32 AM
Hello GerdW,
First off thank you for responding. How would you try to find frequency? I was thinking add it into an array then pass it through the fft function, and then finally graph it. But that doesnt seem to work either. What do you think?
Thank you,
Corey
11-01-2021 11:32 AM - edited 11-01-2021 11:32 AM
You can use a ptbypt function, such as FFT ptbypt. It will maintain an internal history and do the transform on the last N points seen.
11-01-2021 01:58 PM
Hi bmxc,
@bmxc22 wrote:
I was thinking add it into an array then pass it through the fft function, and then finally graph it. But that doesnt seem to work either. What do you think?
Your code uses BuildArray to create an array of exactly one element.
Why do you think you "added" (better call it "append") that sample to an evergrowing array???
You need a shift register to append data to an existing array - the PtByPt function mentioned by Christian already has one inside…