Package DSP.filter.iir

Examples of DSP.filter.iir.Complex


   *
   * @param c    Complex object specifying the complex argument.
   * @return     Complex object specifying the resulting complex value of the rational function.
   */
  public Complex evaluate( Complex c ) {
    Complex retval = new Complex( 0.0, 0.0 );
    Complex num = N.evaluate( c );
    Complex denom = D.evaluate( c );
    if ( denom.abs() != 0.0 ) retval = num.over( denom );
   
    return retval;
  }
View Full Code Here


    b[0] = 1.0;
    Rational R = new Rational( b, a );
   
    for ( int i = 0;  i < 100;  i++ ) {
      double omega = i/25.0;
      System.out.println( omega + "  " + R.evaluate( new Complex( 0.0, omega ) ).abs() + "   " + R.groupDelay(omega) );
    }
  }
View Full Code Here

   * @param c        Complex object containing the argument of the polynomial.
   * @return         Complex object containing the value of the polynomial at this argument.
   */
  public Complex evaluate( Complex c ) {
   
    Complex retval = new Complex( a[order] );
   
    for ( int i = order-1;  i >= 0;  i-- ) {
      retval = retval.times(c).plus( a[i] );
    }
   
    return retval;
  }
View Full Code Here

  public double groupDelay( double omega ) {
   
    if ( order == 0 ) return 0;
   
    else {
      Complex c = new Complex( 0.0, omega );
      Complex N = derivative().evaluate(c);
      Complex D = evaluate(c);
   
      return -(N.over(D)).real();
    }
   
  }
View Full Code Here

   * @param Omega         double specifying the value discrete-time frequency [0 pi] at which the group delay is evaluated.
   * @return              double containing the resulting group delay in samples.
   */
  public double discreteTimeGroupDelay( double Omega ) {
   
    Complex c = Complex.exp( new Complex(0.0, -Omega ) );
   
    Complex N = new Complex( a[order]*order );
    for ( int i = order-1;  i >= 0;  i-- ) {
      N = N.times(c).plus( a[i]*i );
    }
   
    Complex D = evaluate( c );

    return ( N.over(D) ).real();
  }
View Full Code Here

TOP

Related Classes of DSP.filter.iir.Complex

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.