I have a column vector of 7000 data points… of the pattern 0 0 0 0 30 60 90 120 119 118…. 2 1 0 0 0
I want to return the row number for the last cell before the number turns into a 0, every time this happens
Note: All the numbers are variable, and the sequences I want to extract varies in length.
To pick out the maximums I used [pks locs]=findpeaks(a(:,1)), want to do similar for just before the zeroes appear…
Best Answer