matlab用logistic人口增长模型y=[601938035,723070269,1031882511,1160017381,1295330000,1370536875];x=[1953,1964,1982,1990,2000,2010]; plot(x,y,'r*');hold on;p=plotfit(x,y,2)xn=1990:10:2020;yn=polyval(p,xn);plot(xn,yn)xlabel('年份');ylabel('人
来源:学生作业帮助网 编辑:作业帮 时间:2024/09/01 23:41:50
![matlab用logistic人口增长模型y=[601938035,723070269,1031882511,1160017381,1295330000,1370536875];x=[1953,1964,1982,1990,2000,2010]; plot(x,y,'r*');hold on;p=plotfit(x,y,2)xn=1990:10:2020;yn=polyval(p,xn);plot(xn,yn)xlabel('年份');ylabel('人](/uploads/image/z/4529551-31-1.jpg?t=matlab%E7%94%A8logistic%E4%BA%BA%E5%8F%A3%E5%A2%9E%E9%95%BF%E6%A8%A1%E5%9E%8By%3D%5B601938035%2C723070269%2C1031882511%2C1160017381%2C1295330000%2C1370536875%5D%3Bx%3D%5B1953%2C1964%2C1982%2C1990%2C2000%2C2010%5D%3B+plot%28x%2Cy%2C%27r%2A%27%29%3Bhold+on%3Bp%3Dplotfit%28x%2Cy%2C2%29xn%3D1990%3A10%3A2020%3Byn%3Dpolyval%28p%2Cxn%29%3Bplot%28xn%2Cyn%29xlabel%28%27%E5%B9%B4%E4%BB%BD%27%29%3Bylabel%28%27%E4%BA%BA)
matlab用logistic人口增长模型y=[601938035,723070269,1031882511,1160017381,1295330000,1370536875];x=[1953,1964,1982,1990,2000,2010]; plot(x,y,'r*');hold on;p=plotfit(x,y,2)xn=1990:10:2020;yn=polyval(p,xn);plot(xn,yn)xlabel('年份');ylabel('人
matlab用logistic人口增长模型
y=[601938035,723070269,1031882511,1160017381,1295330000,1370536875];
x=[1953,1964,1982,1990,2000,2010];
plot(x,y,'r*');
hold on;
p=plotfit(x,y,2)
xn=1990:10:2020;
yn=polyval(p,xn);
plot(xn,yn)
xlabel('年份');
ylabel('人口数');
legend('原始数据','拟合函数',2);
box on;
grid on;
x1=2020;
y1=polyal(p,x1)
出现了什么问题
matlab用logistic人口增长模型y=[601938035,723070269,1031882511,1160017381,1295330000,1370536875];x=[1953,1964,1982,1990,2000,2010]; plot(x,y,'r*');hold on;p=plotfit(x,y,2)xn=1990:10:2020;yn=polyval(p,xn);plot(xn,yn)xlabel('年份');ylabel('人
存在的问题主要有两方面:
1、你这个拟合函数不对的,是不符合logistic人口增长模型
2、x=[...]和y=[...]数据之间不要加逗号,应写成
x=[1953 1964 1982 1990 2000 2010];
y=[601938035 723070269 1031882511 1160017381 1295330000 1370536875];
plot(x,y)