pzapplet
Class FreqResponse

java.lang.Object
  extended bypzapplet.FreqResponse

public class FreqResponse
extends java.lang.Object

Represents a frequency response of a system. The data is kept as arrays of data points. Once created, the system cannot be altered.

Author:
Brian Williams

Constructor Summary
FreqResponse(ORG.netlib.math.complex.Complex[] zeros, ORG.netlib.math.complex.Complex[] poles)
          This creates a FreqResponse of discrete data points over a range of frequencies, given the poles and zeros passed to this.
FreqResponse(double[] mags, double[] phases, int low, int high)
          This creates a FreqResponse with the specified magnitudes and phases at each frequency ranging from 10^(low) to 10^(high).
 
Method Summary
 double[] getFreqs()
          Returns a double[] of each frequency value iteration
 int getHigh()
           
 int getLow()
           
 double[] getMags()
           
 double[] getPhases()
           
 int getRes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreqResponse

public FreqResponse(ORG.netlib.math.complex.Complex[] zeros,
                    ORG.netlib.math.complex.Complex[] poles)
This creates a FreqResponse of discrete data points over a range of frequencies, given the poles and zeros passed to this.

Parameters:
zeros - - Array of Complex objects representing zeros of a system
poles - - Array of Complex objects representing poles of a system

FreqResponse

public FreqResponse(double[] mags,
                    double[] phases,
                    int low,
                    int high)
This creates a FreqResponse with the specified magnitudes and phases at each frequency ranging from 10^(low) to 10^(high).
MUST FOLLOW -- Length of mags == length of phases -- Lowest and highest frequency points must be powers of 10 -- Length of mags must be evenly divisible by (high - low)

Parameters:
mags - - Array of doubles representing magnitude values
phases - - Array of doubles representing phase values
low - - int representing the lowest frequency (power of 10)
high - - int representing the highest frequency (power of 10)
Method Detail

getFreqs

public double[] getFreqs()
Returns a double[] of each frequency value iteration


getMags

public double[] getMags()
Returns:
a double[] of each magnitude value iteration

getPhases

public double[] getPhases()
Returns:
a double[] of each phase value iteration

getHigh

public int getHigh()
Returns:
Mathematical log of highest frequency used in calculation

getLow

public int getLow()
Returns:
Mathematical log of lowest frequency used in calculation

getRes

public int getRes()
Returns:
Resolution of omega used to calculate frequency response