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

Yusuf TULUNAY
Yusuf TULUNAY 2019년 12월 17일
how can I find this range i can't find the right code
can anyone help me?
Sorry, I don't understand what "window pitch" means to you??? The 420/421 looks to be the spacing (points/frequency/???) between peaks that appear may be an envelope.
What is "range" in the follow-on comment? The peaks you've labelled above?
Have you investigated
doc findpeaks
in Signal Processing Toolbox? It has many input options that may be tweaked for such purposes.
Yusuf TULUNAY
Yusuf TULUNAY 2019년 12월 17일
I do not need peaks of the signal actually window pitch means x distances between peaks. The signal itself repeats every 420 range so I need the code that gives me what that value is without looking the signal. I hope I could tell what I need.
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일

0 개 추천

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

카테고리

태그

질문:

2019년 12월 17일

답변:

2019년 12월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by