How to set threshold point to the first peak arrival?
2 views (last 30 days)
Show older comments
1.how to set first peak arrival
2.how to set threshold point to the first peak arrival to get "x y x" output coordinate needed for neural network input.
0 Comments
Accepted Answer
Mathieu NOE
on 27 Apr 2021
hello
I wonder why doing the complex fft / ifft to remove low frequency signal
this can be done easily still in time domain using filtfilt (with no phase distorsion)
now I am not sure which specific point is to be found in this signal
my understanding was to find the max peak amplitude point , but I am not sure what the breakout point is for
my (simpler) code :
[A]=xlsread('A.xlsx');
% save A;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
x = A(:,1);
y = A(:,2);
dt = mean(diff(x));
Fs = 1/dt;
% some additionnal high pass filtering
N = 2;
fc = 1.2e8;
[B,A] = butter(N,2*fc/Fs,'high');
yy = filtfilt(B,A,y);
% first peak arrival point = max of abs(yy)
[val,ind] = max(abs(yy)); %
tx = x(ind);
figure(1),plot(x,y,'b',x,yy,'r',tx,val,'+g','linewidth',2,'markersize',12);grid on
2 Comments
Mathieu NOE
on 28 Apr 2021
hello
using the high pass filter as shown in my code above will remove also that shift
back to the original question : is the green cross the point you're looking for or what is your definition of "first peak arrival" ?
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!