clc;clear;clear all;
tz=xlsread('data1.xls',6,'B4:F522');
[M N]=size(tz);
t=[1:M];
for i=[2:M-1]
for j=[1:N]
if tz(i,j)==0
tz(i,j)=(tz(i-2,j)+tz(i+2,j))/2;
end
end
end
plot(t,tz(:,2),t,tz(:,N));
xlabel('时间(周)');ylabel('体重(g)');
legend('鲢鱼','鳙鱼',2);
p=polyfit(t,tz(:,2),2);
y=p(1)*t.^2+p(2)*t+p(3);
hold on
plot(t,y,'r');
hold off
附录14
x=xlsread('data1.xls',4,'H5:H64');
t=[1:15]';
plot(t,x(1:15,1));
xlabel('时间(周)');ylabel('浮游植物密度(10^6个/L)'); legend('1号池');
20

