sumfi=0;%将分子的累加值设为0sumyi=0;%将分母的累加值设为0for t=1:24sumfi=sumfi+fi(t)*yi(t);sumyi=sumyi+fi(t)^2;end;ki=sumfi/sumyi;