comparison main.cpp @ 10:c6528c38b23c

a few minor fixes
author Wen X <xue.wen@elec.qmul.ac.uk>
date Thu, 28 Jul 2011 10:36:57 +0100
parents 91301b3d02c5
children 977f541d6683
comparison
equal deleted inserted replaced
9:91301b3d02c5 10:c6528c38b23c
233 { 233 {
234 while (m<=maxT && (autocor[m]<0 || autocor[m]<autocor[m-1] || autocor[m]<autocor[m+1])) m++; 234 while (m<=maxT && (autocor[m]<0 || autocor[m]<autocor[m-1] || autocor[m]<autocor[m+1])) m++;
235 if (m<=maxT) 235 if (m<=maxT)
236 { 236 {
237 int mm=ceil(m*0.6667), mp=floor(m*1.3333), cont=0; 237 int mm=ceil(m*0.6667), mp=floor(m*1.3333), cont=0;
238 for (int im=mm; im<=mp; im++) if (m!=im && autocor[im]>=autocor[m]) {cont=1; break;} 238 //for (int im=mm; im<=mp; im++) if (m!=im && autocor[im]>=autocor[m]) {cont=1; break;}
239 if (cont==0) 239 if (cont==0)
240 { 240 {
241 if (prd==0 || autocor[m]>autocor[prd]*1.05) prd=m; 241 if (prd==0 || autocor[m]>autocor[prd]*1.05) prd=m;
242 } 242 }
243 m++; 243 m++;