time series interpolation of irregular data
1 回表示 (過去 30 日間)
古いコメントを表示
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
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)) ;
0 件のコメント
その他の回答 (1 件)
Sargondjani
2021 年 6 月 23 日
You can use "griddedInterpolant". I would use 'pchip' as method.
0 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!