head	1.2;
access;
symbols;
locks
	jonh:1.2; strict;
comment	@// @;


1.2
date	2000.04.10.00.25.13;	author jonh;	state Exp;
branches;
next	1.1;

1.1
date	2000.04.08.18.22.18;	author jonh;	state Exp;
branches;
next	;


desc
@@


1.2
log
@*** empty log message ***
@
text
@get_data_from_real_experiments = 1;
if (get_data_from_real_experiments),
	several_experiments
	exp_num = 1;
	sub_ex = 1;
	[p,sn] = plot_experiment(experiment(exp_num));
	clf;
	sn1 = multi_select_experiment(sn, experiment(exp_num).subex{sub_ex});
	y = [sn1.times{:}];
	x = repmat([sn1.fileLengthNum],1,length(sn1.times{1}))';
	start = 1;
	y = y(start:end);
	x = x(start:end);
else
	x = (1:100)';
	y = x*0.05+rand(100,1);
end
x = x(:);
y = y(:);

conf = 0.95;
[poly,delta,r2,sigma] = hanyfit(x,y,conf);

hold on;
plot(repmat(x,1,2), ...
	[polyval(poly,x)+sigma, polyval(poly,x)-sigma], 'g-');
plot(x,y,'b.',x,polyval(poly,x),'r.-')
hold off;
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
get_data_from_real_experiments = 0;
d5 2
a6 2
	sub_ex = 3;
	%[p,sn] = plot_experiment(experiment(exp_num));
d18 2
d21 2
a22 8
conf = 0.90;
alpha = 1-conf;
[p,ci] = linfit(x,y,conf);
[mp,ms] = polyfit(x,y,1);
[my,delta] = polyconf(mp,0,ms,alpha);
delta
p
ci
d24 5
a28 9
confidence_interval = ci;
%confidence_interval(2) = delta;
loline = polyval(p+confidence_interval, x);
hiline = polyval(p-confidence_interval, x);
plot(x,loline,'g-',x,hiline,'g-',x,y,'b.',x,polyval(p,x),'r.-')

outliers = (y>loline) | (y<hiline);
disp(sprintf('I count %d outliers for conf %0.2f: %0.2f', ...
	sum(outliers), conf, sum(outliers)/length(y)));
@
