function cell=ConvertToTable(data)

max_id=max(data(:,5));
max_time=max(data(:,1));

for id=1:max_id
    list=[];
    list=find(data(:,5)==id);
    t_list=data(list,1);
    
    cnt=1;
    for t=1:max_time
        if ismember(t,t_list)
            cell(id,t,1:3)=data(list(cnt),2:4);
            cnt=cnt+1;
        else
            cell(id,t,1:3)=NaN;
        end
    end
    
end

end
