function duration = getDuration(session, condition, repetition)%session : the session number.%condition : the condition intrested in (CUE1,CUE2,...)%repetition : the repetition number; same event, different time ;)cmd = sprintf('SPM.Sess(%d,%d).U(%d,%d).dur(%d)',1,session,1,condition,repetition);duration = evalin('base',cmd);end