
constructing master recession curve
2 views (last 30 days)
Show older comments
i got different recession segments and i want to construct master recession curve without using GUI.
could you help me the code?
The figure is attached below.
2 Comments
John D'Errico
on 24 Mar 2020
Here is the figure as a picture, so that you and others can see directly what I am talking about:

So you appear to have many curves, all of which are of varying lengths, appear to have varying shapes, though they may have some general similarities too.
Are you asking how to take all of the curves, then pose some general model for them that would allow them to be translated and scaled, etc., so they now all fit the same model?
There is no magical solution. You need first to pose a model. It looks like some variation of negative exponential model might be appropriate, though we might be looking at the tail of some vaguely signoidal shape too. This is difficult to know, since I have no idea where the data comes from. While you use the word recession, that may come from many different contexts, and I would still have no idea what model would be best here.
Once a model has been chosen (as I said, a negative exponential form would be my best first guess) then you need to use a modeling tool. What tool? I have no idea, since you could use tools from the curve fitting toolbox, the stats toolbox, the optimization toolbox. You could do it simply enough using just fminsearch. Just model each curve independently in a loop over the many curves that you have.
You have the data though. I'm not going to extract it from the figure to show you how to do it.
My initial suggestion of a model would be:
y(L) = a + b*exp(-L/c)
here a,b and c are unknown constants you would need to solve for, again using a regression tool like fit, or one of the many others.
Answers (1)
See Also
Categories
Find more on Get Started with Curve Fitting Toolbox 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!