📄 dcb.asv
字号:
%lottery of double corlor ball
clear all;
windows=1;
windowe=150;
selectnumber=4;
load rawdata.txt;
RD = rawdata;
%remove the item
[rc,cc]=size(RD);
RD=RD(1:rc,3:cc-1);
% count
CT=count_ol(33,RD);
disp('count');
CT
% get the group with highest p and lowest p
G1_CTH=count(33,RD,1);
disp('G1 --- the group with the highest p is:');
G1_CTH(1:1,1:6)
G2_CTL=count(33,RD,0);
disp('G2 --- the group with the lowest p is:');
G2_CTL(1:1,1:6)
% get the 5 groups p
CT5=count_gp(5,RD,1)
% get the group with high p using 5 group method
G3_CTH=ghlp_5p(k,X,flag);
% get the group with high p using 5 group method
% optimize the window size for 5p method
Y=0;
j=1;
pt=1;
for i=windows:windowe
P=getp_5gp(i,RD);
Y(j)=length(find(P>0.5));
if(length(P)>1 & Y(j)>1)
subplot(6,2,pt);
plot(P);
text(1,0.9,['w:',int2str(i)]);
axis([1,length(P),0,1]);
pt=pt+1;
end
j=j+1;
end
Y=[windows:windowe;Y]
% optimize the window size for high and low p select
Y=0;
j=1;
pt=1;
for i=windows:windowe
P=getp(i,selectnumber,RD);
Y(j)=length(find(P>0.67));
if(length(P)>1 & Y(j)>1)
subplot(6,2,pt);
plot(P);
text(1,0.9,['w:',int2str(i)]);
axis([1,length(P),0,1]);
pt=pt+1;
end
j=j+1;
end
Y=[windows:windowe;Y]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -