how to extrapolate with given data? (maybe very simple)

316 次查看(过去 30 天)
I want to guess outside the given data! For example data x = 1:5 y = [7 9 10 11 12] are given. And I want to guess the values at x=6,7. (For any method) How can I do it? Help me..

采纳的回答

Stephen23
Stephen23 2017-6-6
编辑:Stephen23 2017-6-6
>> interp1(x,y,[6,7],'linear','extrap')
ans =
13 14
And remember that extrapolated values are always to be taken with a pinch of salt.
  3 个评论
riadh euldji
riadh euldji 2021-6-26
hello sir how can do extrapolation
let's take this exemple to extrapolate beyond the range x =1:5 like 6 to 8
and our new rang will be x1=1:8 is that possible ????
Stephen23
Stephen23 2021-6-26
@riadh euldji: did you try the code given in my answer ????

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 보간 的更多信息

Community Treasure Hunt

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

Start Hunting!