
close all force
clear all
 disp('Rubidium2')
  lw = 2; 
  set(0, 'DefaultAxesFontSize', 16);
  fs = 16;
  msize = 10;
  rand('seed',0)


data=[...
0.028   0.032   0.031   0.041  0.028  ...
0.039   0.042   0.036   0.037   0.029 ...
0.048   0.037  0.037   0.044   0.039  ...
0.029   0.038];
%cvdata = std(data)/mean(data)
coevar = @(x)  std(x)/mean(x); 
cvdata = coevar(data);
CVs=[];


B=10000
for i = 1:B
    surrogate = bootsample(data');
    CVs =[CVs coevar(surrogate)];  
    %CVs =[CVs std(surrogate)/mean(surrogate)];
end

figure(1)

% hold on
% xx= -4.5:0.01:4.5;
% plot(xx, tpdf(xx, ndf),'r-','Linewidth',3)
% plot(xx, normpdf(xx),'g-','Linewidth',3)
% legend('bootstrap distribution','t','normal','Location','NorthWest')
% plot([t t],[0 0.6],'r-','LineWidth',3)
% xlabel('t^*')
% hold off

histn(CVs,0.05,0.005, 0.25);
axis([0.05 0.25 0 20])
hold on
plot([cvdata cvdata],[0 20],'r-','linewidth',2)
%print -depsc 'C:\BESTAT\Boot\Booteps\rubidium2boot.eps'



