fixed a bug in compute_mean_time_course.m