If spkT is a vector containing just the times where a signal is detected e.g., [1 21 3456 300000 3750000], what if I start with something like this? Can someone help me complete this? I also included how I am converting spkT into a vector with 1s and 0s that is 3750000 elements long.
whos spkT
  Name         Size            Bytes  Class     Attributes
  spkT      6154x1             49232  double  
train = zeros(3750000,1); % Create zeros vector to represent FALSE values
train(spkT) = 1; % Index 1s (TRUEs) into positions where signals occured along 3750000 number line
spkTrains(:,cnt) = train; % Create matrix where columns are channels and rows are signals in each channel
Intervals = diff(spkT) % Should give the time elapsed between subsequent signals
Intervals(1:20)
ans =
    16
     4
    16
    13
     1
    30
    40
     1
     3
     1
    42
    68
    57
    66
    61
     1
    15
     1
     1
     1
BurstIndices = find(Intervals <= 1275) % Should give indices where the time units between signal at time t and t+1 is <= 1275
BurstIndices(1:10)
ans =
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
Not sure how to finish this from here. Problem with this is that it does not recognize that there are discrete bursts scatterd throughout the time series. I am not sure how to count bursts when I just get the index for individual spikes within all bursts
