资源介绍
clear
syms a b;
c=[a b]';
A=[489 498 546 572 606 608];
B=cumsum(A);%yuan shi shu ju lei jia
n=length(A);
for i=1:(n-1)
C(i)=(B(i)+B(i+1))/2%sheng cheng lei jia ju zhen
end
%ji suan daiding can shu de zhi
D=A;D(1)=[];
D=D';
E=[-C;ones(1,n-1)];
c=inv(E*E')*E*D;
c=c';
a=c(1);
b=c(2);
%yu ce houxushuju
F=[];F(1)=A(1);
for i=2:(n+2)
F(i)=(A(1)-b/a)/exp(a*(i-1))+b/a;
end
G=[];G(1)=A(1);
for i=2:(n+2)
G(i)=F(i)-F(i-1);