If the constant is fairly flat, and is always in the upper portion (because you are not interested in flat parts near the minimum values at the bottom) you can find the difference and threshold it and use find(). Untested code (because you forgot to attach your data):
subplot(3, 1, 1);
% Find difference from previous element.
diffValues = diff(y);
subplot(3, 1, 2);
% Find max, min, and mid values.
minValue = min(y);
maxValue = max(y);
midValue = (maxValue + minValue) / 2;
threshold = 15; % What ever value defines "flat" for you.