mathieu@14: function [] = checkcOverlapping(sceneSchedule,sceneDuration) mathieu@14: %% check overlapping mathieu@14: onset=[sceneSchedule(2:end).position]; mathieu@14: offset=[sceneSchedule(2:end).duration]+onset; mathieu@14: [~,index]=sort(onset); mathieu@14: onset=onset(index); mathieu@14: offset=offset(index); mathieu@14: coveringIndice=onset(2:end)-offset(1:end-1); mathieu@14: if(find(coveringIndice<0)) mathieu@14: error('covering is not respected') mathieu@14: end mathieu@14: mathieu@14: %% check sceneDuration mathieu@14: if(offset(end)>sceneDuration+0.1) mathieu@14: error('Last event length is superior to the scene Duration') mathieu@14: end mathieu@14: