public void testFactorFomelExample() { float[] r = {24.0f,242.0f,867.0f,1334.0f,867.0f,242.0f,24.0f}; int[] lag1 = {0,1,2,3}; CausalFilter cf = new CausalFilter(lag1); cf.factorWilsonBurg(10,0.0f,r); float[] a = cf.getA(); assertEquals(24.0f,a[0],10*FLT_EPSILON); assertEquals(26.0f,a[1],10*FLT_EPSILON); assertEquals( 9.0f,a[2],10*FLT_EPSILON); assertEquals( 1.0f,a[3],10*FLT_EPSILON); }
1, 1, 1, 1, 1 }; CausalFilter cf = new CausalFilter(lag1,lag2); cf.factorWilsonBurg(100,FLT_EPSILON,r); float[][] s = new float[3][3];
1, 1, 1, }; CausalFilter cf = new CausalFilter(lag1,lag2,lag3); cf.factorWilsonBurg(100,FLT_EPSILON,r); float[][][] s = new float[3][3][3];
float dtheta = FLT_PI/4.0f; float ftheta = -FLT_PI/8.0f; CausalFilter cf = new CausalFilter(lag1,lag2); for (int itheta=0; itheta<ntheta; ++itheta) { float theta = ftheta+itheta*dtheta;
CausalFilter cf = new CausalFilter(lag1,lag2,lag3); for (int iphi=0; iphi<nphi; ++iphi) { float phi = fphi+iphi*dphi;
public void test1Random() { int[] lag1 = {0,1,2}; final float[] a = { 1.00f, -1.80f, 0.81f}; // (1-0.9z)(1-0.9z) CausalFilter cf = new CausalFilter(lag1,a); int n = 100; float tiny = n*10.0f*FLT_EPSILON;
-0.02290331f, -0.04141619f, -0.08457147f, -0.20031442f, -0.55659920f }; CausalFilter cf = new CausalFilter(lag1,lag2,a); int n1 = 19; int n2 = 21;
-0.0213786f, -0.0898909f, -0.4322719f }; CausalFilter cf = new CausalFilter(lag1,lag2,lag3,a); int n1 = 11; int n2 = 13;