[Scipy-svn] r5486 - trunk/scipy/fftpack
Sun Jan 18 05:25:40 CST 2009
Date: 2009-01-18 05:25:34 -0600 (Sun, 18 Jan 2009)
New Revision: 5486
Add doc for dct3.
--- trunk/scipy/fftpack/realtransforms.py 2009-01-18 11:25:15 UTC (rev 5485)
+++ trunk/scipy/fftpack/realtransforms.py 2009-01-18 11:25:34 UTC (rev 5486)
@@ -36,7 +36,7 @@
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
@@ -81,14 +81,9 @@
Return Discrete Cosine Transform (type III) of arbitrary type sequence x.
- There are several definitions, we use the following:
- y[k] = x + 2 * sum x[n]*cos(pi*(k+0.5)*n/N), 0 <= k < N.
- The DCT-III is the inverse of DCT-II 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.
x : array-like
@@ -104,11 +99,22 @@
+ There are several definitions, we use the following (norm=None):
+ y[k] = x + 2 * sum x[n]*cos(pi*(k+0.5)*n/N), 0 <= k < N.
+ Or (norm='ortho'), for 0 <= k < N:
+ y[k] = x / sqrt(N) + sqrt(1/N) * sum x[n]*cos(pi*(k+0.5)*n/N)
The (unnormalized) DCT-III is the inverse of the (unnormalized) DCT-II, up
- to a factor 2*N.
+ to a factor 2*N. The orthonormalized DCT-III is exactly the inverse of the
+ orthonormalized DCT-II.
- This is also called 'the' inverse DCT (IDCT).
>>> x = np.linspace(0, 9, 10)
More information about the Scipy-svn