This repository has been archived on 2021-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
scientificComputing/pointprocesses/code/plotcounthist.m

15 lines
402 B
Matlab

function plotcounthist(spikes, w)
% Plot histogram of spike counts.
%
% Arguments:
% spikes: a cell array of vectors of spike times in seconds
% w: duration of window in seconds for computing the counts
n = counts(spikes, w);
maxn = max(n);
[counts, bins] = hist(n, 0:1:maxn+10);
counts = counts / sum(counts);
bar(bins, counts);
xlabel('counts k');
ylabel('P(k)');
end