function isivec = isis( spikes )
% returns a single list of isis computed from all trials in spikes
% spikes: a cell array of vectors of spike times

    isivec = [];
    for k = 1:length(spikes)
        difftimes = diff( spikes{k} );
        if ( size( difftimes, 1 ) == 1 )
            isivec = [ isivec difftimes ];
        elseif ( size( difftimes, 2 ) == 1 )
            isivec = [ isivec difftimes' ];
        end
    end
end

