[Scipysvn] r5486  trunk/scipy/fftpack
scipysvn@scip...
scipysvn@scip...
Sun Jan 18 05:25:40 CST 2009
Author: cdavid
Date: 20090118 05:25:34 0600 (Sun, 18 Jan 2009)
New Revision: 5486
Modified:
trunk/scipy/fftpack/realtransforms.py
Log:
Add doc for dct3.
Modified: trunk/scipy/fftpack/realtransforms.py
===================================================================
 trunk/scipy/fftpack/realtransforms.py 20090118 11:25:15 UTC (rev 5485)
+++ trunk/scipy/fftpack/realtransforms.py 20090118 11:25:34 UTC (rev 5486)
@@ 36,7 +36,7 @@
sequence x.
This is the most commonly used DCT, and corresponds to what is called 'the'
 DCT; in particular, dct2(x, norm='ortho) gives the same result as Matlab
+ DCT; in particular, dct2(x, norm='ortho') gives the same result as Matlab
dct function
Parameters
@@ 81,14 +81,9 @@
"""
Return Discrete Cosine Transform (type III) of arbitrary type sequence x.
 There are several definitions, we use the following:

 N1
 y[k] = x[0] + 2 * sum x[n]*cos(pi*(k+0.5)*n/N), 0 <= k < N.
 n=0

 The DCTIII is the inverse of DCTII up to a scaling factor.

+ This is also called 'the' inverse DCT (IDCT)  dct3(x, norm='ortho') is
+ exactly the same as the idct function of Matlab.
+
Parameters

x : arraylike
@@ 104,11 +99,22 @@
Notes

+ There are several definitions, we use the following (norm=None):
+
+ N1
+ y[k] = x[0] + 2 * sum x[n]*cos(pi*(k+0.5)*n/N), 0 <= k < N.
+ n=0
+
+ Or (norm='ortho'), for 0 <= k < N:
+
+ N1
+ y[k] = x[0] / sqrt(N) + sqrt(1/N) * sum x[n]*cos(pi*(k+0.5)*n/N)
+ n=0
+
The (unnormalized) DCTIII is the inverse of the (unnormalized) DCTII, up
 to a factor 2*N.
+ to a factor 2*N. The orthonormalized DCTIII is exactly the inverse of the
+ orthonormalized DCTII.
 This is also called 'the' inverse DCT (IDCT).

Examples

>>> x = np.linspace(0, 9, 10)
More information about the Scipysvn
mailing list