Home > data-analysis > manip > event > event_total_length.m

event_total_length

PURPOSE ^

event_total_length Return the sum of the durations of all the periods

SYNOPSIS ^

function t_len = event_total_length(events)

DESCRIPTION ^

 event_total_length  Return the sum of the durations of all the periods
 of the given event.
   USAGE: p = event_proportion(event, scope)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function t_len = event_total_length(events)
0002 % event_total_length  Return the sum of the durations of all the periods
0003 % of the given event.
0004 %   USAGE: p = event_proportion(event, scope)
0005 %
0006 t_len = 0;
0007 if ~isempty(events)
0008     t_len = sum(events(:,2) - events(:,1));
0009 end

Generated on Tue 23-May-2017 20:00:55 by m2html © 2005