function spikeraster( spikes )
% Display a spike raster of the spike times given in spikes.
% spikes: a cell array of vectors of spike times

ntrials = length(spikes);
for k = 1:ntrials
    times = 1000.0*spikes{k};  % conversion to ms
    for i = 1:length( times )
      line([times(i) times(i)],[k-0.4 k+0.4], 'Color', 'k' ); 
    end
end
xlabel( 'Time [ms]' );
ylabel( 'Trials');
ylim( [ 0.3 ntrials+0.7 ] )

end

