Code covered by the BSD License
-
A=rkp(vec,k)
-
F=rob_TRBB(x,H,tax,time_lag,n...
-
F=rob_VMAB(x,s,l,band,tax,tim...
-
F=rob_forecastingB(x,tax,time...
-
[CD1,CD2,p1,p2]=chow_test(X,l...
-
[Ntrading,nb,ns,yb,ys,yb_s,B,...
-
[Ntrading,nb,ns,yb,ys,yb_s,B,...
-
[Ntrading,nb,ns,yb,ys,yb_s,B,...
-
[V,Z1,Z2,p1,p2]=xrand(x,k,n)
-
[V,Z1,Z2,p1,p2]=xrand2(x,k,n)
-
[V,Z1,Z2,p1,p2]=xrand3(x,k,n)
-
[VR,Zk,Zhk]=vrt(x,k)
-
[resultat,t,p]=momentum(index...
-
res=averday(x)
-
res=wild_boot(X,l,n)
-
ttest3(x,m,alpha,tail,dim)
TTEST One-sample and paired-sample T-test.
-
View all files
|
|
| res=averday(x)
|
function res=averday(x)
% -----------------------------------------------------------------
% Elaborated by : BEN HASSEN Anis
% "Institut Suprieur de Gestion de Tunis" (ISG Tunis)
% University of Tunis
% 41, rue de la Libert - Cit Bouchoucha - C.P. : 2000 Le Bardo
% Tunisia
% University e-mail: http://www.isg.rnu.tn/
% Personal e-mail: benhassenanis@yahoo.com
% _________________________________________________________________
% January 14, 2004.
% auxiliary function
l=length(x);
i=1;
while i<=l & x(i)~=1
i=i+1;
end
debut=i;
i=l;
while i>=1 & x(i)~=1
i=i-1;
end
fin=i;
if debut<fin
for i=debut:fin-1,
if x(i)==0 && x(i+1)==1
debut=[debut i+1];
elseif x(i)==1 && x(i+1)==0
fin=[fin i];
end
end
fin=[fin(2:length(fin)) fin(1)];
res=fin-debut+1;
else res=0;
end
|
|
Contact us at files@mathworks.com