How to automatically chop up signal??

2 views (last 30 days)
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!
Thanks

Accepted Answer

Star Strider
Star Strider on 14 Mar 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.

More Answers (0)

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!