How to automatically chop up signal??

3 Ansichten (letzte 30 Tage)
Joe Bennet
Joe Bennet am 14 Mär. 2021
Beantwortet: Star Strider am 14 Mär. 2021
In the attacthed figure, there is a graph displaying the response of human skin that has been palpated by 5 sinusoidal waves of increasing frequency. I would like to write a peice of code that automatically identifies the points at which each one of these five signals starts and ends, but I really dont know where to even start. Any help would be greatly appreciated!

Akzeptierte Antwort

Star Strider
Star Strider am 14 Mär. 2021
It depends on where you define ‘start’ and ‘end’.
If you want to consider the middle of the signal rather tha either peak, first use the bandpass function to elimiinate the baseline drift and high-frequency noise. (Use the fft function or the Signal Analyzer App to determine the frequency content in order to design the filter correctly.) Then, to determine the approximate zero-crossing indices, use:
zxidx = find(diff(sign(filtered_signal)));
You can then use a for loop and interp1 to determine the exact aero-crossing times if that is important.
Iff you define them by the peaks or valleys, use findpeaks,, or islocalmax or islocalmin to determine those indices.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by