Peak spike extraction from a signal
3 ビュー (過去 30 日間)
古いコメントを表示
I am trying to extract peak spike from a signal. After extracting that peak spike, i want to calculate its rise time, fall time etc. Amplitude of given signal is stored in 'amp' (column vector) and time is stored in 't' (column vector). My idea is to figure out the 4% of peak value as a starting and ending point of my signal. I have written following code for this;
p(i)=-npk(i); %% already calculated peak value
edgee=0.04*p(i); %% starting,falling edge
[lo,ilo]=min(abs(amp(1:in(i)-edgee))); %% in(i) is the index of peak value
[hi,ihi]=min(abs(amp(in(i):end) -edgee));
Signal=amp(ilo:ihi);
x1=t(ilo:ihi);
For starting point, i am getting right value i.e 4% of peak value. But, for falling point of spike, i am getting wrong value. Anybody here, can guide me please as i am troubleshooting my code from several days. I have also attached pictures of original signal and extracted signal.
2 件のコメント
Image Analyst
2021 年 9 月 6 日
Do you want the upwards going spike, or the larger downward spike? Can you attach your data?
回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!