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

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 日

9 投票

>> 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 件のコメント

JaeSung Choi
JaeSung Choi 2017 年 6 月 6 日
oh my god, thank you very much!! you saved me from searching
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 件)

カテゴリ

ヘルプ センター および File Exchange설치 및 라이선스 부여 소개 についてさらに検索

質問済み:

2017 年 6 月 6 日

コメント済み:

2021 年 6 月 26 日

Community Treasure Hunt

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

Start Hunting!