tign(i,j)=interval*(time-1); % I do that because time starts with 00:00