Revision 706, 488 bytes
(checked in by smidl, 15 years ago)
|
eol-native
|
-
Property svn:eol-style set to
native
|
Line | |
---|
1 | function plotestimates(true,means,lb,ub); |
---|
2 | % function plots a graph of estimates with lower and upper bounds |
---|
3 | |
---|
4 | ndat = size(means,1); |
---|
5 | |
---|
6 | if size(true,1)==1 % constant value |
---|
7 | true = ones(ndat,1)*true; |
---|
8 | end |
---|
9 | |
---|
10 | |
---|
11 | hold off |
---|
12 | plot(true,'-.'); |
---|
13 | hold on |
---|
14 | plot(means(1:ndat,:)); |
---|
15 | co = get(gca,'ColorOrder'); |
---|
16 | for i=1:size(means,2) |
---|
17 | ind =1:floor(ndat/20):ndat; % 20 bars in picture |
---|
18 | h=errorbar(ind,means(ind,i),... |
---|
19 | means(ind,i)-lb(ind,i),means(ind,i)-ub(ind,i),'.'); |
---|
20 | set(h,'color',co(i,:)); |
---|
21 | end |
---|