-
Notifications
You must be signed in to change notification settings - Fork 4
/
sderrs.m
95 lines (71 loc) · 1.93 KB
/
sderrs.m
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
81
82
83
84
function sderrs(SN)
% sderrs(SN)
%
% Shows variance curves for a variety of SN ratios and dampings.
% Uses SDMSE2 to find the optimum eta and SDERR to calculate the MSE.
%
% Last modified by fjsimons-at-alum.mit.edu, 25.10.2005
defval('SN',[4 6 8 10]);
TH=10;
L=45;
ntheta=720;
fax=(L+1)^2/4/pi;
lins={'-','-','--'};
cols={grey,'k',grey};
clf
if length(SN)>1
[ah,ha]=krijetem(subnum(length(SN)/2,2));
fig2print(gcf,'portrait')
serre(ah(1:2),1/3,'across')
serre(ah(3:4),1/3,'across')
serre(ha(1:2),1/2,'down')
serre(ha(3:4),1/2,'down')
else
ah=gca;
fig2print(gcf,'portrait')
end
for ondex=1:length(SN)
mineTH=10^9;
% Figure out the minimum theta
[eta,mseO,mseR,mseC,fO,fR,fC]=sdmse2(SN(ondex),[],TH,L);
% Which damping levels do we plot?
eta=[0 fO 1];
legsi{ondex}=sprintf('N/S = %5.1f%s',1./SN(ondex)*100,'%');
axes(ah(ondex))
for index=1:length(eta)
legso{index}=sprintf('%s = %5.2f','\eta',eta(index));
[mseTH,theta]=sderr(SN(ondex),TH,L,eta(index),ntheta,NaN);
half=[theta<=pi/2];
% Don't do square root no more
eTH=mseTH/fax*100;
mineTH=min(mineTH,min(eTH));
p(index,ondex)=plot(theta(half)*180/pi,eTH(half),...
'lines',lins{index},'color',cols{index});
hold on
end
xl(ondex)=xlabel(sprintf('colatitude %s','\theta'));
yl(ondex)=ylabel(sprintf('mse (%s)','%'));
set(ah(ondex),'xtick',[0 TH 45 90])
xlim([0 90])
% ylim([mineTH 100]+[-1 1]*[100-mineTH]/15)
yl1=[1/SN(ondex)*100 100];
ylim(yl1+[-1 0]*range(yl1)/15)
set(ah(ondex),'ytick',unique(round([yl1(1) 25 50 75 yl1(2)]*10)/10))
[bh(ondex),th(ondex)]=boxtex('ur',ah(ondex),legsi{ondex},...
12,[],1.05,1.1);
loh(ondex)=legend(ah(ondex),legso,'Location','SouthEast');
grid on
end
hold off
set([xl yl],'FontS',13)
set(ah,'FontS',12)
if length(SN)>1
delete(xl(1:2))
delete(yl([2 4]))
nolabels(ah(1:2),1)
deggies(ah(3:4),1)
end
set(p(:),'LineW',1)
movev(loh,.13)
longticks(ah(:))
figdisp