correlation window range code

3 ビュー (過去 30 日間)
Yusuf TULUNAY
Yusuf TULUNAY 2019 年 12 月 17 日
回答済み: Asvin Kumar 2019 年 12 月 23 日
z1=xcorr(GA2L5E1(:,4),10000);
plot(z1)
I got the correlation of the vibration data, and I found this signal, now I have to subtract the window pitch, and the window pitch is 420 421 as seen.
and here is code which is i tried to find window range
for i=1:10000;
[M,I(i)]=max(z1(i:i+420));
I(i)=I(i)+i;
for i=1:25;
[N,X(i)]= max(I(i+400-399:i+400));
i=i+1;
end
end
  5 件のコメント
dpb
dpb 2019 年 12 月 17 日
As noted, that's something should be able to do with findpeaks
Not much anybody here can do except suggest w/o a sample data file to work with...
Yusuf TULUNAY
Yusuf TULUNAY 2019 年 12 月 17 日
okey thank you

サインインしてコメントする。

回答 (1 件)

Asvin Kumar
Asvin Kumar 2019 年 12 月 23 日
Check out the findpeak function as mentioned in the comments above.
You can use multiple Name-Value pairs to suit your use case. For example, you can set the minimum separation between peaks, set a minimum or threshold for peak height etc. Have a look at examples here: https://www.mathworks.com/help/signal/ref/findpeaks.html#bufhyo1-2

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by