extrapolate the plot to the point out of the interval
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to extrapolate the plot in the figure to the start point on x-axis, i tried with "interp1" but i could not do that, Please guide in this regard.
0 commentaires
Réponses (1)
John D'Errico
le 10 Mai 2019
Modifié(e) : John D'Errico
le 10 Mai 2019
You can't. Well, you can, but interp1 will give you meaningless garbage, as it should.
Extrapolation is a dangerous thing. And extrapolation without intelligence behind it? That equals dangerously meaningless garbage.
Think of it like this: How is any extrapolation to know that your function should behave outside of the interval? Should an extrapolant extrapolate linearly from that last point? Should it somehow be able to know that your curve seems to be an vaguely exponentially decreasing oscillating function? Should it somehow be able to model your function as such?
Computers are generally not intelligent things, unless you provide the intelligence, the knowledge of the process you have plotted. They cannot just look at some data and know how to extrapolate it.
So in order for MATLAB to somehow extrapolate, you must first decide on an appropriate model for that process. Then you would use a tool like the curve fitting toolbox, and estimate the parameters of that model. Finally, you would then evaluate that model at any set of points. Sadly, even having done all of that, your extrapolant need not be very accurately predictive. That is the nature of extrapolation. If we could do it truly well, then we could do things like predict the weather years in advance. Instead, we look outside, and say it looks like it might rain, maybe.
5 commentaires
John D'Errico
le 16 Mai 2019
Modifié(e) : John D'Errico
le 16 Mai 2019
You should realize that your data is useless for extrapolation as you have posted it?
By writing those numbers out to only 5 significant digits, you have created replicate data, thus duplicate values in x, with what seems to be smoothly varying y. Here is subset of the data from the ends:
1.4551e+10 6.9182e-18
1.4551e+10 7.0748e-18
1.4551e+10 7.2165e-18
1.4551e+10 7.3378e-18
1.4551e+10 7.4334e-18
1.4551e+10 7.4985e-18
1.4551e+10 7.5286e-18
1.4551e+10 7.5195e-18
1.4551e+10 7.4679e-18
1.4551e+10 7.3709e-18
...
1.5708e+10 3.7775e-19
1.5708e+10 6.7912e-19
1.5709e+10 1.1964e-19
1.5709e+10 8.7459e-19
1.5709e+10 2.2978e-19
1.5709e+10 3.8253e-20
1.5709e+10 2.1481e-19
1.5709e+10 8.0683e-20
1.5709e+10 8.3761e-19
1.5709e+10 3.8734e-19
1.5709e+10 2.2553e-19
1.5709e+10 1.2713e-18
1.5709e+10 3.2215e-19
1.5709e+10 2.7337e-19
1.571e+10 1.0491e-18
1.571e+10 2.3649e-19
1.571e+10 3.8928e-19
Voir également
Catégories
En savoir plus sur Bartlett dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!