function [c_v,ISI] = coef_var(spike_train)
%   Computes the coefficient of variation of the interspike intervals (ISI's) of spike train.
%   Also, returns all the ISI's.

%   NEUR 1680
%   Last updated 02/08/2012

spike_times = find(spike_train);    % spike times [measured in dt units]

ISI = diff(spike_times);            % interspike intervals
c_v = std(ISI)/mean(ISI);           % coefficient of variation of ISI [dimensionless]

