How do I find the period or frequency of a signal?
311 次查看(过去 30 天)
显示 更早的评论
I currently have an array of data points which is clearly periodic and i can see the period just by lopoking at the graph, however how would i go about getting matlab to give me a readout of the period. One problem with finding the distance between peaks is that they are faily noisey so was thinking of finding distance between the dips, but i am having trouble workiing out how i would go about doing that.
0 个评论
采纳的回答
Star Strider
2018-3-7
5 个评论
jb4earth
2019-9-19
@Xu you are correct
PEAK period should be calculated as:
peak_wave_period = max(diff(your_time_vector(peaks)))
DoubleO7
2019-10-15
I was wondering if anyone could expand upon this answer. What do you mean by time vector? Would an example of a time vector be:
tv = 1:100;
Is writing the following code correct for displaying the period?
[pks,locs] = findpeaks(data,tv)
period = max(diff(locs))
I appreciate your input.
更多回答(1 个)
Dmitry Grigoryev
2020-10-14
编辑:Dmitry Grigoryev
2020-10-14
Start by substracting the sliding average from the raw signal.
Then shift the signal by rougly 1 period and use autocorrelation to find the exact period value.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!