How to extrapolate given data to find more number of points?

조회 수: 3 (최근 30일)
Kushagra Kirtiman
Kushagra Kirtiman 2022년 8월 6일
편집: Kushagra Kirtiman 2022년 8월 6일
I have a set of data for example
  1. X Y
0 45
2 38
6 34
I want to find values of y for x=8,10, 12 etc. Is there any way to do it in MATLAB

답변 (1개)

John D'Errico
John D'Errico 2022년 8월 6일
Your words ask how to do interpolation. However, then you ask about extrapolation. The two problems are VERY different.
To quote Mark Twain (Life on the Mississippi) on the dangers of extrapolation...
"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 one mile and a third per year. Therefore, any calm person, who is not blind or idiotic, can see that in the Old Oolitic Silurian Period,' just a million years ago next November, the Lower Mississippi River was upwards of one million three hundred thousand miles long, and stuck out over the Gulf of Mexico like a fishing-rod. 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 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."
You can use interp1 to perform interpolation. However, extrapolation is a dangerous thing. You are best off to choose an intelligent and APPROPRIATE model, fit it to your data, then use it for extrapolation.

카테고리

Help CenterFile Exchange에서 Text Data Preparation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by