SciLib.SP
Class Sp

java.lang.Object
  extended by SciLib.SP.Sp

public final class Sp
extends java.lang.Object

This class contains some useful methods using in Signal Processing.


Constructor Summary
Sp()
           
 
Method Summary
static vector conv(double[] x, double[] y)
          Computer the linear convolution of two signals x*y
static vector conv(vector x, vector y)
          Computer the linear convolution of two signals x*y
static vector filter(double[] b, double[] a, double[] x)
          Filters the data in vector x with the filter described by vectors a and b
static vector filter(vector b, vector a, vector x)
          Filters the data in vector x with the filter described by vectors a and b
static double muCode(double x, int mu)
          Compute the muLaw code of a double x, -1 <= x <= 1
static vector muCode(vector x, int mu)
          Compute the muLaw code of a double x, 0 <= x <= 1
static double power(vector s)
          Computer the power of a finite signal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sp

public Sp()
Method Detail

power

public static double power(vector s)
Computer the power of a finite signal

Parameters:
s - A vector that represents the signal
Returns:
A double value

conv

public static vector conv(double[] x,
                          double[] y)
Computer the linear convolution of two signals x*y

Parameters:
x - A double array
y - A double array
Returns:
A vector

conv

public static vector conv(vector x,
                          vector y)
Computer the linear convolution of two signals x*y

Parameters:
x - A vector signal
y - A vector signal
Returns:
A vector

filter

public static vector filter(vector b,
                            vector a,
                            vector x)
Filters the data in vector x with the filter described by vectors a and b

Parameters:
x - A vector signal
b - A filter coefficient vector
a - A filter coefficient vector
Returns:
A vector

filter

public static vector filter(double[] b,
                            double[] a,
                            double[] x)
Filters the data in vector x with the filter described by vectors a and b

Parameters:
x - A double array signal
b - A filter coefficient array
a - A filter coefficient array
Returns:
A vector

muCode

public static double muCode(double x,
                            int mu)
Compute the muLaw code of a double x, -1 <= x <= 1

Parameters:
x - A double value
mu - An integer value, mu = 0, 1, 100, 255
Returns:
A double value

muCode

public static vector muCode(vector x,
                            int mu)
Compute the muLaw code of a double x, 0 <= x <= 1

Parameters:
x - A double value
mu - An integer value, mu = 0, 1, 100, 255
Returns:
A double value