MATLAB: How to find a value from a timeseries

MATLABmatlab functiontime series

hi Guys, I got a problem analyzing a time series, because of its length I need to find out a way to obtain the required value without need to scroll all the time series. For instance, how to find from the attached time series the value 79?, it must appear twice in the same time series?. Could you help me?.

Best Answer

Go for logical indexing:
S = load('soc.mat') ;
t = S.soc.Time ;
y = S.soc.Data ;
idx = abs(y-70)<10^-5 ;
[t(idx) y(idx)]