Trying to find out when a curve becomes exponential

2 views (last 30 days)
Greetings,
I have a dataset from simulations of curves which I want to find out when this curve becomes exponential or when its not.
I am using the fact that an exponential curve is liner in a semi-log plot. So, I plot the curve as log(y)-x, determine the R2 using polyfit...but thats the problem. When can you say that the curve is not linear anymore?
I have values that are for example, R2 =
0.9997
1.0000
0.9989
0.9956
0.9346
0.9572
I just don't know based on this how to determine when the log(y)-x curve stops being linear so that the y-x plot is exponential.
Any good idea of how you can determine this in MATLAB?

Accepted Answer

Stephen23
Stephen23 on 29 Sep 2014
Edited: Stephen23 on 29 Sep 2014
"When can you say that the curve is not linear anymore?"
That depends entirely on the problem, your requirements, any knowledge of the underlying system, the tools that you use, their numerical precision, the output that you need, the level of accuracy that you require, the further processing that might occur, the arbitrary demands of your customers and a million other possible factors.
To visualize the curve transition, subset the data for all/many contiguous data subsets, fit the required curve type to each subset, and then plot the least squares residuals (this might be multidimensional). If there is a clear knee to this curve, then you can pick the subset range that gives the widest range of data with a small enough residual to satisfy your demands. If there is no knee, then your hypothesis is false.
Also you might like to read about linear least squares fitting using mldivide .

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!