Changeset 1513

Show
Ignore:
Timestamp:
09/29/08 09:10:26 (2 months ago)
Author:
cdavid
Message:

Add docstring for dctii.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/talkbox/scikits/talkbox/transforms/dct.py

    r1369 r1513  
    4848 
    4949def dctii(x): 
     50    """Compute a Discrete Cosine Transform, type II. 
     51 
     52    The DCT type II is defined as: 
     53 
     54        \forall u \in 0...N-1,  
     55        dct(u) = a(u) sum_{i=0}^{N-1}{f(i)cos((i + 0.5)\pi u} 
     56 
     57    Where a(0) = sqrt(1/(4N)), a(u) = sqrt(1/(2N)) for u > 0 
     58 
     59    Parameters 
     60    ========== 
     61    x : array-like 
     62        input signal 
     63 
     64    Returns 
     65    ======= 
     66    y : array-like 
     67        DCT-II 
     68    """ 
    5069    n = x.size 
    5170    y = np.zeros(n * 4, x.dtype)