t1=2.4390e-02; t2=2.4994e-02; t3=1.2748e-01; t4=9.3777e-02;

% ********* hc mine ************* 5: filter 4 s=2, 6: filter 4 s=3
x=[[	2.9362e-02   3.0444e-02   1.1499e-01   9.0615e-02   4.1318e-04 ...
	4.3212e-04   1.3099e-03   1.2893e-04]
[	2.7541e-02   2.8362e-02   1.1714e-01   9.1951e-02   4.1773e-04 ...
	 4.3110e-04  1.4755e-03   1.2963e-04]
[	2.5723e-02   2.6320e-02   1.1991e-01   9.3349e-02   4.1474e-04 ...
	4.7779e-04   1.5966e-03   1.3156e-04]
[	2.5170e-02   2.5734e-02   1.2017e-01   9.3810e-02   4.3111e-04 ... 
	4.8084e-04   1.8418e-03   1.3558e-04]
[	3.0604e-02   3.2285e-02   1.1663e-01   8.8617e-02   3.3056e-04 ...
	3.4482e-04   1.3194e-03   1.1490e-04]
[	3.4323e-02   3.6710e-02   1.1391e-01   8.5190e-02   2.9875e-04 ...
	3.1011e-04   1.0840e-03   1.0661e-04]];
x(:,1)=x(:,1)/t1*100; x(:,5)=x(:,5)/t1*100;
x(:,2)=x(:,2)/t2*100; x(:,6)=x(:,6)/t2*100;

sel=[4 2 6];
figure(1),p1=plot(x(sel,1)-100,x(sel,5),'s'); hold on
        plot(x(sel,1)-100,x(sel,5)); hold off; plerr(x(sel,1)-100,x(sel,5));
figure(2),p2=plot(x(sel,2)-100,x(sel,6),'s'); hold on
        plot(x(sel,2)-100,x(sel,6)); hold off; plerr(x(sel,2)-100,x(sel,6));
%subplot(223),p3=plot(abs(x(sel,3)-t3),x(sel,7),'s'); hold on
%        plot(abs(x(sel,3)-t3),x(sel,7)); hold off;
%	plerr(abs(x(sel,3)-t3),x(sel,7));
%subplot(224),p4=plot(abs(x(sel,4)-t4),x(sel,8),'s'); hold on
%        plot(abs(x(sel,4)-t4),x(sel,8)); hold off; 
%	plerr(abs(x(sel,4)-t4),x(sel,8));

% ********* huber delta=0.004 *************
x=[[	4.5140e-02   4.5854e-02   1.3875e-01   1.0416e-01   1.4987e-03 ...
	1.4192e-03   3.8931e-03   4.7973e-04]
[	2.6890e-02   2.7434e-02   1.2623e-01   9.4994e-02   8.2589e-04 ...
	6.7251e-04   2.4495e-03   1.9957e-04]
[	2.5046e-02   2.5499e-02   1.2383e-01   9.4477e-02   5.9997e-04 ...
	6.6327e-04   2.4047e-03   1.9584e-04]
[	2.5666e-02   2.6197e-02   1.2065e-01   9.4169e-02   5.6715e-04 ...
	6.1229e-04   2.2241e-03   1.9653e-04]
[	2.7088e-02   2.7792e-02   1.1662e-01   9.3590e-02   5.4059e-04 ...
	5.5952e-04   1.7389e-03   1.9456e-04]
[	2.9484e-02   3.0469e-02   1.1302e-01   9.2445e-02   4.9760e-04 ...
	5.1271e-04   1.1960e-03   1.8387e-04]
[	3.7291e-02   3.9580e-02   1.0759e-01   8.7959e-02   3.4659e-04 ...
	3.7091e-04   5.5348e-04   1.3405e-04]];
x(:,1)=x(:,1)/t1*100; x(:,5)=x(:,5)/t1*100;
x(:,2)=x(:,2)/t2*100; x(:,6)=x(:,6)/t2*100;

sel=[2:7];
figure(1),hold on; q1=plot(x(sel,1)-100,x(sel,5),'o');
	plot(x(sel,1)-100,x(sel,5),'--'); hold off; plerr(x(sel,1)-100,x(sel,5))
figure(2),hold on; q2=plot(x(sel,2)-100,x(sel,6),'o');
	plot(x(sel,2)-100,x(sel,6),'--'); hold off; plerr(x(sel,2)-100,x(sel,6))
%subplot(223),hold on; q3=plot(abs(x(sel,3)-t3),x(sel,7),'o');
%	plot(abs(x(sel,3)-t3),x(sel,7),'--'); hold off
%	plerr(abs(x(sel,3)-t3),x(sel,7));
%subplot(224),hold on; q4=plot(abs(x(sel,4)-t4),x(sel,8),'o');
%	plot(abs(x(sel,4)-t4),x(sel,8),'--'); hold off
%	plerr(abs(x(sel,4)-t4),x(sel,8));

% ********* huber delta=0.002 *************
x=[[	3.3213e-02   3.3873e-02   1.2975e-01   9.8175e-02   1.1417e-03 ...
	9.7699e-04   2.6090e-03   3.0513e-04]
[	2.6815e-02   2.7374e-02   1.2631e-01   9.5140e-02   8.3241e-04 ...
	6.7748e-04   2.4163e-03   2.1555e-04]
[	2.5414e-02   2.5946e-02   1.2082e-01   9.4287e-02   5.6203e-04 ...
	6.2437e-04   2.2868e-03   1.9624e-04]
[	2.6526e-02   2.7201e-02   1.1591e-01   9.3859e-02   5.4315e-04 ...
	5.8040e-04   2.1112e-03   2.0165e-04]
[	3.2233e-02   3.3664e-02   1.0548e-01   9.0996e-02   4.4494e-04 ...
	4.7211e-04   6.8214e-04   1.6987e-04]];
x(:,1)=x(:,1)/t1*100; x(:,5)=x(:,5)/t1*100;
x(:,2)=x(:,2)/t2*100; x(:,6)=x(:,6)/t2*100;

sel=[1:5];
figure(1),hold on; r1=plot(x(sel,1)-100,x(sel,5),'+');
        plot(x(sel,1)-100,x(sel,5),'-.'); hold off; %plerr(x(sel,1)-100,x(sel,5))
figure(2),hold on; r2=plot(x(sel,2)-100,x(sel,6),'+');
        plot(x(sel,2)-100,x(sel,6),'-.'); hold off; %plerr(x(sel,2)-100,x(sel,6))
%subplot(223),hold on; r3=plot(abs(x(sel,3)-t3),x(sel,7),'+');
%        plot(abs(x(sel,3)-t3),x(sel,7),'-.'); hold off
%	plerr(abs(x(sel,3)-t3),x(sel,7))
%subplot(224),hold on; r4=plot(abs(x(sel,4)-t4),x(sel,8),'+');
%        plot(abs(x(sel,4)-t4),x(sel,8),'-.'); hold off
%	plerr(abs(x(sel,4)-t4),x(sel,8))

% ********* huber delta=0.008 *************
x=[[	2.5159e-02   2.5603e-02   1.2402e-01   9.4432e-02   6.1318e-04 ...
	6.7017e-04   2.3600e-03   1.9883e-04]
[	2.5983e-02   2.6534e-02   1.2142e-01   9.3989e-02   5.7065e-04 ...
	6.0428e-04   2.1317e-03   1.9507e-04]
[	3.3998e-02   3.5631e-02   1.1342e-01   8.9901e-02   3.9906e-04 ...
	4.0144e-04   1.1666e-03   1.6310e-04]
[	4.3865e-02   4.7084e-02   1.0556e-01   8.2987e-02   2.7271e-04 ...
	2.7605e-04   6.3454e-04   1.2614e-04]
[	5.8700e-02   6.1714e-02   8.9655e-02   6.8060e-02   1.5362e-04 ...
	1.5584e-04   1.7743e-04   6.0570e-05]];
x(:,1)=x(:,1)/t1*100; x(:,5)=x(:,5)/t1*100;
x(:,2)=x(:,2)/t2*100; x(:,6)=x(:,6)/t2*100;

sel=[1:5];
figure(1),hold on; s1=plot(x(sel,1)-100,x(sel,5),'x');
        plot(x(sel,1)-100,x(sel,5),':'); hold off; %plerr(x(sel,1)-100,x(sel,5))
figure(2),hold on; s2=plot(x(sel,2)-100,x(sel,6),'x');
        plot(x(sel,2)-100,x(sel,6),':'); hold off; %plerr(x(sel,2)-100,x(sel,6))

figure(1),legend([q1 r1 s1 p1],'Huber:  \delta=0.004',...
        'Huber:  \delta=0.002','Huber:  \delta=0.008','Proposed method');
axis([0 80 1 5])
%xlabel('normalized bias (%)'); ylabel('normalized standard deviation (%)');
figure(2),legend([q2 r2 s2 p2],'Huber:  \delta=0.004',...
        'Huber:  \delta=0.002','Huber:  \delta=0.008','Proposed method'); 
axis([0 80 1 5])
%xlabel('normalized bias (%)'); ylabel('normalized standard deviation (%)');


