-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisplaySubStimulusEvents.m
More file actions
63 lines (41 loc) · 1.17 KB
/
Copy pathDisplaySubStimulusEvents.m
File metadata and controls
63 lines (41 loc) · 1.17 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
% function displaysubstimulusevents(binsize)
% cd d:/data
binsize = 3;
load jonsevents
rez = [3 5];
rez_ind = find(rez == binsize);
ss_ind=[];
rank=[];
for c = 1:length(events)
ss_events = events(c).ss_event_times{rez_ind};
num_intervals = events(c).number_of_intervals(rez_ind);
if ~isempty(ss_events)
ss_ind = [ss_ind c];
rank = [rank num_intervals];
end
end
figure
all_ss_events=[];
for c = 1:length(ss_ind)
rank_ind = find(rank == min(rank));
rank_ind = rank_ind(1);
rank(rank_ind) = [];
ss_events = events(ss_ind(rank_ind)).ss_event_times{rez_ind};
ss_ind(rank_ind) = [];
all_ss_events = [all_ss_events ss_events];
for x = 1:length(ss_events)
line([c-.5 c+.5],[ss_events(x) ss_events(x)],'Color','k','LineWidth',2)
hold on
end
end
set(gca,'XTick',1:1:10)
xlabel('Cell Number')
ylabel('Event Interval (ms)')
ylim([0 35])
xlim([0 11])
figure
[N] = histc(all_ss_events,0:5:35);
barh(0:5:35,N,'b')
ylim([0 35])
xlabel('# Occurrences')
ylabel('Event Interval (ms)')