Isolate horizonal part of curve
3 Ansichten (letzte 30 Tage)
I have the data in the graph below (blue dotted line). I have fitted a curve (red line). How can I isolate the flat/horizontal part?
ft = fittype('(a.*x.^b)',...
f = fit(dataX,dataY,ft,'StartPoint',[600 -1]);
coeffvals = coeffvalues(f);
The ExampleData file is also attached.
John D'Errico am 31 Jan. 2023
What part of this curve is horizontal?
F = exp(-10*x)
Well, clearly, ithe horizontal part lies above x==0.5.
Oh wait. It must start above x==1.
Wow. That is strange. It must start above x==1.5.
I think I'm gonna get it right soon. It DEFINITELY starts at x==2.
This is really, really strange.
Or, maybe, just maybe, there is NO horizontal part of the curve. Wherever you look, the curve has EXACTLY the same shape.
Walter Roberson am 31 Jan. 2023
Declare your horizontal cutoff to be the place where abs() of the gradient is less than some threshold. If necessary, low-pass filter the data first (to remove experimental noise)
Image Analyst am 31 Jan. 2023
Maybe adjust the axis to start and end wherever you want, like
but like John said, there is no flat part so you just have to make some judgment about where you think the flat part starts.