lib/minim/src/ddf/minim/analysis/FourierTransform.java
/**
   * Calculate the average amplitude of the frequency band bounded by
   * <code>lowFreq</code> and <code>hiFreq</code>, inclusive.
   * 
   * @param lowFreq
   *          float: the lower bound of the band, in Hertz
   * @param hiFreq
   *          float: the upper bound of the band, in Hertz
   *          
   * @return float: the average of all spectrum values within the bounds
   * 
   * @related FFT
   */
Calculate the average amplitude of the frequency band bounded by
lowFreq and hiFreq, inclusive.

@param lowFreq
float: the lower bound of the band, in Hertz
@param hiFreq
float: the upper bound of the band, in Hertz

@return float: the average of all spectrum values within the bounds

@related FFT
Calculate the average amplitude of the frequency band bounded by lowFreq and hiFreq inclusive . @param lowFreq float : the lower bound of the band in Hertz @param hiFreq float : the upper bound of the band in Hertz @return float : the average of all spectrum values within the bounds @related FFT
public float calcAvg(float lowFreq, float hiFreq)
  {
    int lowBound = freqToIndex(lowFreq);
    int hiBound = freqToIndex(hiFreq);
    float avg = 0;
    for (int i = lowBound; i <= hiBound; i++)
    {
      avg += spectrum[i];
    }
    avg /= (hiBound - lowBound + 1);
    return avg;
  }
public float calcAvg ( float lowFreq , float hiFreq ) { int lowBound = freqToIndex ( lowFreq ) ; int hiBound = freqToIndex ( hiFreq ) ; float avg = 0 ; for ( int i = lowBound ; i <= hiBound ; i ++ ) { avg += spectrum [ i ] ; } avg /= ( hiBound - lowBound + 1 ) ; return avg ; }
Calculate the average amplitude of the frequency band bounded by
 <code>lowFreq</code> and <code>hiFreq</code>, inclusive.
Calculate the average amplitude of the frequency band bounded by <code > lowFreq< / code > and <code > hiFreq< / code > inclusive .