Start and end point of a signal

14 ビュー (過去 30 日間)
Amit Daud
Amit Daud 2021 年 2 月 1 日
コメント済み: Amit Daud 2021 年 2 月 1 日
Hello Everyone,
I am fairly new to the MATLAB signal processing. I have a signal which I already threshold. Now, I need to find the start and end point of the signal. i.e. sample number where the signal started to get recognised by detector and the sample number where it did not recognise the signal anymore. Can anyone suggest any method to do so. I have attached some screenshots of the plot of signal for better understanding. I have also attached the matlab code but could not attach the .CSV file as it exceeds the 5MB size limit.
Thanks in ADV.
Amit D.

採用された回答

Timo Dietz
Timo Dietz 2021 年 2 月 1 日
Not sure whether I understood your question, but if you want to get the indices of an array for which the data meets certain requirements/thresholds, you can use find.
E.g. if you want to have the indices of all values inside an array which exceed 5, you can just write
idx = find(array_name > 5)
min/max of idx gives you the start and the end index.
  3 件のコメント
Timo Dietz
Timo Dietz 2021 年 2 月 1 日
編集済み: Timo Dietz 2021 年 2 月 1 日
In case you are just interested in the index, you should have what you need. To be a bit more precise:
First index: idx1 = find(y_array_name > threshold, 1, 'first')
% gives you the first index where the y values exceed 'threshold'
Last index: idx2 = find(y_array_name > threshold, 1, 'last')
% gives you the last index where the y values exceed 'threshold'
In case you have a dedicated x array, just use x(idx1) and x(idx2) to get the corresponding x axis values.
Note: This works for one burst of pulses, only. If you have multiple bursts - each with multpile pulses - and you want to find the start/stop of each individual burst, it's getting much more complicated. In this case you need to have further informations about the nature (e.g. frequency, burst length, ...) of the signals.
Amit Daud
Amit Daud 2021 年 2 月 1 日
Ahhh... Got it. Thank you so much for assist.

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

その他の回答 (0 件)

カテゴリ

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