필터 지우기
필터 지우기

time series interpolation of irregular data

조회 수: 1 (최근 30일)
Harish Vernekar
Harish Vernekar 2021년 6월 23일
댓글: Harish Vernekar 2021년 6월 23일
here goes the data , i need data for vacant years ,
Thank you!
2012 105683
2013 1,108,498
2014 1,177,810
2015 1,271,872
2016 1,351,970
2017 1,433,392
2018 1,486,493
2019 1,546,517
2020 1,598,41
2021
2022
2023
2024
2025
2026
2027
2028 251800

채택된 답변

KSSV
KSSV 2021년 6월 23일
data = [ 2012 105683
2013 1108498
2014 1177810
2015 1271872
2016 1351970
2017 1433392
2018 1486493
2019 1546517
2020 159841
2021 NaN
2022 NaN
2023 NaN
2024 NaN
2025 NaN
2026 NaN
2027 NaN
2028 251800 ] ;
x = data(:,1) ;
y = data(:,2) ;
idx = isnan(y) ;
y(idx) = interp1(x(~idx),y(~idx),x(idx)) ;

추가 답변 (1개)

Sargondjani
Sargondjani 2021년 6월 23일
You can use "griddedInterpolant". I would use 'pchip' as method.

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by