Finding A Straight In in a S Curve

Stu_Souten

New member
Joined
Nov 11, 2018
Messages
6
Hello all

I was hoping someone could help me with the following.

I have a plot of data that looks like an S.

I want to find 2 x points on the plot that resembles a straight and obtain those co-ordinates.

Attached is a picture of a plot which shaped as an S.

I have found the portion of the straight and marked them in green.

I wish to know the co-ordinates of these points.

Lets assume that the plot is generated by the function f(x), is there a method that would allow me to find the straight section in this plot?

Thank you.
 

Attachments

  • P1.png
    P1.png
    16.1 KB · Views: 2
That looks very visual. Are you SURE there is an analytical solution?

Can you calculate the slope of your green line?
 
The portion of the red line marked in green that you said is "straight" can be shown not to be straight...

I stretched the image width 1500% then added a straight line in blue to compare to the curve in red.

P1.jpg
 
Hello all

I was hoping someone could help me with the following.

I have a plot of data that looks like an S.

I want to find 2 x points on the plot that resembles a straight and obtain those co-ordinates.

Attached is a picture of a plot which shaped as an S.

I have found the portion of the straight and marked them in green.

I wish to know the co-ordinates of these points.

Lets assume that the plot is generated by the function f(x), is there a method that would allow me to find the straight section in this plot?

Thank you.
You'd have to decide what tolerance is acceptable. If you actually have a function, you might consider its derivative, find its maximum, and find the interval over which it drops an allowable amount from that.
 
You'd have to decide what tolerance is acceptable. If you actually have a function, you might consider its derivative, find its maximum, and find the interval over which it drops an allowable amount from that.

Hi Dr Peterson

Thank you for your response.

The plot is from a set of data, use regression to obtain a function that gives me a good fit to my data.

From this function I want to find the section of the function that is closest to a straight, visually i know it is between x=2 and x = 3 but i am looking for an analytical solution.

I can take the derivative but i am not sure where to go from there?


Data.png
 
Hi Dr Peterson

Thank you for your response.

The plot is from a set of data, use regression to obtain a function that gives me a good fit to my data.

From this function I want to find the section of the function that is closest to a straight, visually i know it is between x=2 and x = 3 but i am looking for an analytical solution.

I can take the derivative but i am not sure where to go from there?


View attachment 22630
I would calculate "curvature" of different regions - and declare/claim the region with least curvature to be linear.
 
The plot is from a set of data, use regression to obtain a function that gives me a good fit to my data.

From this function I want to find the section of the function that is closest to a straight, visually i know it is between x=2 and x = 3 but i am looking for an analytical solution.

I can take the derivative but i am not sure where to go from there?


View attachment 22630

How about showing us the graph combined with a graph of the derivative. You might be able to see better what I was suggesting by looking at the graph.

The idea of looking for a region of near-zero curvature may be better; or, almost equivalently, near-zero second derivative.

But also, you may need to clarify what you mean by "analytical". Do you want to automate/program this, or to determine it by hand using the algebraic formula, or to use tools available in your program? Since your regression formula is a high-degree polynomial, you won't be able to solve exactly, if that's what you mean. What I suggested would not be just a visual guess, but something that would give you specific numerical values, depending on what tools you use.
 
Do you understand that any sufficiently smooth curve is approximated to some degree by a straight line around every point?

If you do not specify the size of the interval and some measure of the degree of approximation required, you are simply asking a meaningless question. Furthermore, if you do not even have an estimate of the function to be approximated, it is meaninglessness to the power of meaninglessness.

You could ask what is the maximum range (or maximum ranges) of values where a linear approximation to a given function satisfies some specified measure of goodness of fit and what are those linear approximations. I’d be amazed if no one here can help you answer that question. But no one can answer a question that has no mathematical meaning whatsoever.
 
Top