Skip to content

vlt.neuro.spiketrains.spiketrain_poisson_n

  SPIKETRAIN_POISSON_N - Return a Poisson spike train with N spikes

     SPIKETIMES = vlt.neuro.spiketrains.spiketrain_poisson_n(LAMBDA, N, TIMERESOLUTION)

    Returns a list of SPIKETIMES of length N that are generated by a
    Poisson process with mean rate LAMBDA and time resolution 
    TIMERESOLUTION.

    Example:
        lambda = 10; % 10Hz
        timeres = 0.001; % 1ms bins
        spiketimes = spiketrain_posson_n(lambda, 10, timeres);
        % returns 10 spikes distributed in a Poisson manner with rate
        % 10Hz, 1ms bins