# How to identify the beginning and the end of a signal using MATLAB

I have multiple signals as shown in this image. I'd like automatically detect time for the earliest detection of the signal (approx 0.7e4 in S1-B3-B (orange)) and last detected occurrence of the signal (approx 4.2e4 in S2-B3-B (purple)).

Is there a smart way to that? I'm quite new to signal processing.

Maybe start by calculating the difference between samples, i.e.: $$s[i]-s[i-1]$$ for each sample. I highly encourage to just play with the signals when starting with signal processing. Try different functions on the samples.