function rasterplot(spikes, tmax) % Display a spike raster of the spike times given in spikes. % % rasterplot(spikes, tmax) % % Arguments: % spikes: a cell array of vectors of spike times in seconds % tmax: plot spike raster up to tmax seconds in_msecs = tmax < 1.5 spiketimes = []; trials = []; ntrials = length(spikes); for k = 1:ntrials times = spikes{k}; times = times(times