function s=sample(v,told,tnew)

     for i=1:length(tnew)
     s(i,:)=v((find(abs(told-tnew(i))==min(abs(told-tnew(i))))),:);
     end

