population=[133126,133770,134413,135069,135738,136427,137122,137866,138639,139538];
year=[2009,2010,2011,2012,2013,2014,2015,2016,2017,2018];
p1=pchip(year,population,2019:2021);
p2=spline(year,population,2019:2020);
figure;
plot(year,population,'o',2019:2021,p1,'r*-',2019:2021,p2,'bx-')
legend('樣本點','分段三次','三次樣條','Location','SouthEast')
請問錯在哪
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/256052.html
標籤:數據結構與算法
