MATLAB: Extrapolation!!

curve fittingextrapolation problemfitting

Hi everyone! I've got a big problem here…
I have some x and y values:
x=[14.57261875 14.72416687 14.85546972 14.96644958 15.09755813 15.23869218 15.33941339 15.4501601 15.58088007 15.67126492 15.75150771 15.79153196 15.8315562 15.89159258 ]
y=[9159.164387 9388.584929 9602.741855 9832.286745 10123.07262 10459.80477 10735.35812 11056.85775 11500.90152 11853.1149 12205.35936 12419.79607 12634.23278 12955.88784]
I use cftool to make a polynomial fit (3rd order). As you see the lower limit of x values is ~14.5. I want to extrapolate to x=9 but it's necessery to put some conditions for that. To explain if i use the fittedmodel(from cftooll) the required values is not what i want because ,since the equation is a third degree, the curvature changes.
If i know that curvature changes about x=7 how can i require from matlab not change the tilt-curvature?
Excuse me for my english…
Thanks a lot

Best Answer

Shiver. You have data that lies between 14.5 and 15.9, and you wish to extrapolate down to x = 9???????????? Have you learned too little from the works of Mark Twain?
“In the space of one hundred and seventy six years the Lower Mississippi has shortened itself two hundred and forty-two miles. That is an average of a trifle over a mile and a third per year. Therefore, any calm person, who is not blind or idiotic, can see that in the Old Oölitic Silurian Period, just a million years ago next November, the Lower Mississippi was upwards of one million three hundred thousand miles long, and stuck out over the Gulf of Mexico like a fishing-pole. And by the same token any person can see that seven hundred and forty-two years from now the Lower Mississippi will be only a mile and three-quarters long, and Cairo [Illinois] and New Orleans will have joined their streets together and be plodding comfortably along under a single mayor and a mutual board of aldermen. There is something fascinating about science. One gets such wholesale returns of conjecture out of such a trifling investment of fact.” "Life on the Mississippi", Mark Twain, 1884
Ok. if you insist on doing this extrapolation down to an arbitrarily virtually random value at x = 9, then use a tool that can do it in style, and will have the properties you desire for that curve. My SLM tools will do exactly what you need.
slm = slmengine(x,y,'plot','on','knots', ...
[9 14.5 15 15.5 16],'increasing','on','concaveup','on');
Find SLM on the file exchange:
Related Question