# I have the following accelerometer signal, I want to segment or slice the signal into Red parts and Green parts

I want to count steps which are basically represented by peaks in the signal. the red part in the signal doesnt correspond to any walking activity, I want to ignore them. Any help on segmenting or croping out the green parts of the signal.

The next step would be to take a short time Fourier transform. MATLAB has already implemented this in the stft function. Using the defaults and plotting the result, I get this: