%rinomina il file t2T.m
function T=t2T(toff,eff_T,DT)
I=zeros(3,10);
T=[];

for j=1:10
pos=find(toff<j*DT);
n=length(pos);
for i=1:n
I(:,j)=I(:,j)+eff_T(:,pos(i))*(j*DT-toff(pos(i)));
end
T=[T;I(:,j)/DT];

toff(pos)=j*DT;
end
