growthrate.m (278B)
1 function gr=growthrate(x,yrs); 2 3 % growthrate.m 4 % 5 % yrs=[1 10; 6 % 1 5; 7 % 6 10]; 8 % 9 % x=TxN vector ==> compute the average growth rate of x over the yrs periods. 10 11 gr=zeros(size(yrs,1),size(x,2)); 12 for i=1:size(yrs,1); 13 gr(i,:)=mean(delta(log(x(yrs(i,1):yrs(i,2),:)))); 14 end;