MATLAB: Detecting plateau in a data.

plateau

Hi All, more info and better clarification in reply.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Hi All,
I have this profile presented in image.
I need to detect the point where the value falls to zero. Forms a plateau. This plateau changes for various experiments so the moving average technique is not efficient.
Currently I can carry out a linear fitting whether I threshold a gradient. However the small number of data points in this set makes it difficult to determine the true value. I was wondering if anyone can guide towards the right direction.
Many thanks

Best Answer

Why is 81-85 not also a plateau?
You can use diff() or stdfilt() to determine where the variability of your data is low. This will find a plateau at any level. Combine this with ANDing of your data to get plateaus that are low, like less than 0.5 or whatever.
Attach your data for more help.