-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPlotRawSigRasters.m
More file actions
31 lines (27 loc) · 853 Bytes
/
PlotRawSigRasters.m
File metadata and controls
31 lines (27 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function PlotRawSigRasters(rawsigs,alignrawidx)
numtrial=size(rawsigs,1);
chrono=1;
plotstart=50000;
plotstop=25000;
numsubplot=numtrial;
rawsigrastplot=figure('color','white');
hold on
for rtrial=1:numtrial
rrasters=rawsigs(rtrial,:);
alignidx=alignrawidx(rtrial);
start=alignidx - plotstart;
stop=alignidx + plotstop;
if start < 1
start = 1;
end
if stop > length(rrasters)
stop = length(rrasters);
end
% too many trial to subplots, so superimpose them
% hrastplot(rtrial)=subplot(numsubplot,1,rtrial,'Layer','top', ...
% 'XTick',[],'YTick',[],'XColor','white','YColor','white');
rrasters=rrasters(start:stop);
plot(rrasters);
set(gca,'xlim',[1 length(start:stop)]);
axis(gca, 'off'); % axis tight sets the axis limits to the range of the data.
end