Package DSP.filter

Examples of DSP.filter.LagrangePolynomial


     
      double delta = computeDelta( G );
     
      System.out.println( "delta: " + delta );
      
      LagrangePolynomial LP = constructInterpolatingPolynomial( G, delta );
   
      //  Compute current approximant (GA) and error function (E) on grid
   
      for ( int i = 0;  i < G.gridSize;  i++ ) {
        GA[i] = LP.evaluate( G.X[i] );
        E[i= GA[i] - G.H[i];
      }
     
      // Search for new extrema starting from old extrema
     
View Full Code Here


      x[i] = G.X[ j ];
      f[i] = G.H[j] - s*delta/G.W[j];
      s = -s;
    }
   
    return new LagrangePolynomial( x, f );
  }
View Full Code Here

   * @param   Nc   The number of coefficients of the corresponding FIR filter. 
   * @return       double[] containing the coefficients of the FIR filter.
   */
  static double[] calculateCoefficients( DesignGrid G, int Nc ) {
   
    LagrangePolynomial LP = constructInterpolatingPolynomial( G, computeDelta( G ) );
  
    int     log2nfft = 6;
    int     nfft     = 64;
    while ( nfft < Nc ) {
      nfft *= 2;
      log2nfft++;
    }
    double[] X        = new double[ nfft ];
    double[] x        = new double[ nfft ];
    for ( int i = 0;  i <= nfft/2;  i++ ) {
      X[i] = (double) LP.evaluate( Math.cos( 2.0*Math.PI*i/nfft ) );
    }
   
    RDFT dft = new RDFT( log2nfft );
    dft.evaluateInverse( X, x );
   
View Full Code Here

TOP

Related Classes of DSP.filter.LagrangePolynomial

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.