I would like to find the time instant at which a certain value is reached in a time-series data with noise. If there are no peaks in the data, I could do the following in MATLAB.
Code posted https://in.mathworks.com/matlabcentral/answers/263429-retrieve-the-time-that-a-certain-value-is-reached-within-a-time-series#answer_205866
ts = timeseries(d,t);
thr = 55;
data = ts.data(:);
time = ts.time(:);
ind = find(data>thr,1,'first');
But when there is noise, I am not sure what has to be done.
In the time-series data plotted in the above image I want to find the time instant at which the y-axis value 5 is reached. The data actually stabilizes to 5 at t>=100 s. But due to the presence of noise in the data, we see a peak that reaches 5 somewhere around 20 s . I would like to know how to detect e.g 100 seconds as the right time and not 20 s . The code posted above will only give 20 s as the answer.
The sample data plotted in the above image can be found [here](https://github.com/DeepaMahm/misc/blob/master/Untitled.txt)
Suggestions will be really helpful.