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

oh my god, thank you very much!! you saved me from searching
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 ????
@riadh euldji: did you try the code given in my answer ????

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

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!