How to determine where the data is not linear anymore

36 Views Asked by At

I have some data. When I plot these data, the graph looks very linear when $x>x_0$ (In the following figure $x_0$ is shown by dashed lines). One way to determine the exact location where the graph is linear is to use eyeball, but that is very subjective and does not see scientific.

enter image description here

The question are (1) what is the criterion for determining $x_0$? (2) how can we implement the criterion using say MATLAB or Python?