function [IMP2,IMP] = calcimp(B1,M,Sig,alpha,nt);

[nv,i]   = size(B1);
I        = eye(nv);
Cbar     = inv(I-inv(I-M)*B1);
A0       = inv(Cbar)*chol(Cbar*Sig*Cbar')'
IMP(1)   = A0(2,1);
C        = B1;
for j=2:nt;
  tem       = C*A0;
  IMP(j)    = tem(2,1);
  C         = (B1+M)*C;
end;
for j=1:nt; 
  IMP2(j,1) = (alpha.^[j-1:-1:0])*IMP(1:j)';
end;
