-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnormShiftOverThreshold.m
More file actions
80 lines (61 loc) · 1.58 KB
/
Copy pathnormShiftOverThreshold.m
File metadata and controls
80 lines (61 loc) · 1.58 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
x = linspace(-4,8,5001);
dx = x(2)-x(1);
thres = linspace(0,3,201);
y = normpdf(x);
normfac = 1-normcdf(thres);
expect = nan(size(thres));
for i = 1:length(thres)
myind = x > thres(i);
expect(i) = x(myind)*y(myind)'*dx / normfac(i);
end
figure
plot(thres,expect)
set(gca,'XDir','reverse')
figure
h = nan(1,6);
h(1) = subplot(2,3,1);
mypos = get(gca,'Position');
plot(x,y,'k')
hold on
plot([1 1],[0 .5],'k--')
set(gca,'XLim',[-4 6])
annotation('arrow',mypos(1)+mypos(3)*[.4 .8],mypos(2)+[.5 .5]*mypos(4))
ylabel('PDF')
xlabel('pulsatile score')
h(2) = subplot(2,3,2);
mypos = get(gca,'Position');
y2 = normpdf(x-4);
plot(x,.7*y+.3*y2,'k')
hold on
plot([2 2],get(gca,'YLim'),'k--')
set(gca,'XLim',[-4 8])
annotation('arrow',mypos(1)+mypos(3)*[1/3 1/3],mypos(2)+[.6 .4]*mypos(4))
annotation('arrow',mypos(1)+mypos(3)*[2/3 2/3],mypos(2)+[0.05 .25]*mypos(4))
h(3) = subplot(2,3,3);
mypos = get(gca,'Position');
plot(x,.7*y+.3*y2,'k')
hold on
plot([2 2],get(gca,'YLim'),'k--')
set(gca,'XLim',[-4 8])
annotation('arrow',mypos(1)+mypos(3)*[1/3 1/3],mypos(2)+[.6 .4]*mypos(4))
annotation('arrow',mypos(1)+mypos(3)*[2/3 2/3],mypos(2)+[.05 .25]*mypos(4))
annotation('arrow',mypos(1)+mypos(3)*[2/3 .9],mypos(2)+[.15 .15]*mypos(4))
h(4) = subplot(2,3,4);
zo = [0 1];
plot(zo,.1+.8*zo,'b')
hold on
plot(zo,.95-.9*zo,'r')
ylabel('Mean')
xlabel('Ligand dose')
h(5) = subplot(2,3,5);
plot(zo,.1+.8*zo,'b')
hold on
plot(zo,.5+0*zo,'r')
h(6) = subplot(2,3,6);
plot(zo,.1+.8*zo,'b')
hold on
plot(zo,.05+.65*zo,'r')
legend('fraction','features')
for i = 1:length(h)
set(h(i),'XTick',[],'YTick',[])
end