emmanouil@0: function [eventRoll] = convertEventListToEventRoll(onset,offset,classNames) emmanouil@0: emmanouil@0: emmanouil@0: % Initialize emmanouil@0: eventRoll = zeros(ceil(offset(length(offset))*100),16); emmanouil@0: eventID = {'alert','clearthroat','cough','doorslam','drawer','keyboard','keys',... emmanouil@0: 'knock','laughter','mouse','pageturn','pendrop','phone','printer','speech','switch'}; emmanouil@0: emmanouil@0: emmanouil@0: % Fill-in eventRoll emmanouil@0: for i=1:length(onset) emmanouil@0: emmanouil@0: pos = strmatch(classNames{i}, eventID); emmanouil@0: emmanouil@0: eventRoll(floor(onset(i)*100):ceil(offset(i)*100),pos) = 1; emmanouil@0: emmanouil@0: end;