Signal_processing doc: typo fix for dct and dst 60/12260/2
Paul BIGNIER [Mon, 12 Aug 2013 13:29:13 +0000 (15:29 +0200)]
Suggested by http://mailinglists.scilab.org/Scilab-users-discrete-cosine-transform-td4027189.html .

Change-Id: Ia0c95c5894fc03c397a540d798a2b5b33c38b3ca

scilab/modules/signal_processing/help/en_US/transforms/dct.xml
scilab/modules/signal_processing/help/en_US/transforms/dst.xml

index f3f63b3..b790697 100644 (file)
@@ -3,19 +3,19 @@
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 1997   - INRIA
 * Copyright (C) 2012 - Serge Steer - INRIA
-* 
+*
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
-* are also available at    
+* are also available at
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 *
 -->
-<refentry xmlns="http://docbook.org/ns/docbook" 
-          xmlns:xlink="http://www.w3.org/1999/xlink" 
-          xmlns:svg="http://www.w3.org/2000/svg" 
-          xmlns:mml="http://www.w3.org/1998/Math/MathML" 
-          xmlns:db="http://docbook.org/ns/docbook" 
+<refentry xmlns="http://docbook.org/ns/docbook"
+          xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook"
           xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="dct">
     <refnamediv>
         <refname>dct</refname>
@@ -76,7 +76,7 @@
                     vector of positive integers.  See the Description part for details.
                     <para>
                         Each element must be a divisor
-                        of the total number of elements of <literal>A</literal>. 
+                        of the total number of elements of <literal>A</literal>.
                     </para>
                     <para>
                         The product of the elements must be less than the total
         </variablelist>
     </refsection>
     <refsection>
-        <title>Description</title> 
+        <title>Description</title>
         <refsection>
-            <title>Transform description</title> 
+            <title>Transform description</title>
             <para>
                 This function realizes direct or
                 inverse 1-D or N-D Discrete Cosine Transforms with shift depending on the <literal>option</literal> parameter value. For a 1-D array  <latex>$A$</latex> of length  <latex>$n$</latex>:
             <itemizedlist>
                 <listitem>
                     <para>
-                        For <literal>"dct1"</literal> the function computes the unnormalized DCT-I transform: 
+                        For <literal>"dct1"</literal> the function computes the unnormalized DCT-I transform:
                     </para>
                     <para>
                         <latex>
-                            $X(k) = X(1)+(-1)^{k-1}X(n)+2\sum_{i=2}^{n-1} {A(i)
+                            $X(k) = A(1) + (-1)^{k-1}A(n) + 2\sum_{i=2}^{n-1} {A(i)
                             \cos\frac{\pi (i -1)(k-1)}{n-1}}, k=1\ldots n$
                         </latex>
                     </para>
                     </para>
                     <para>
                         <latex>
-                            $X(k) =2 \sum_{i=1}^{n} {A(i) \cos\frac{\pi (i
+                            $X(k) = 2 \sum_{i=1}^{n} {A(i) \cos\frac{\pi (i
                             -1/2)(k-1)}{n}}, k=1\ldots n$
                         </latex>
                     </para>
                     </para>
                     <para>
                         <latex>
-                            $X(k) =X(1)+ 2 \sum_{i=2}^{n} {A(i) \cos\frac{\pi (i
+                            $X(k) = A(1) + 2 \sum_{i=2}^{n} {A(i) \cos\frac{\pi (i
                             -1)(k-1/2)}{n}}, k=1\ldots n$
                         </latex>
                     </para>
                     </para>
                     <para>
                         <latex>
-                            $X(k) =2 \sum_{i=1}^{n} {A(i) \cos\frac{\pi (i
+                            $X(k) = 2 \sum_{i=1}^{n} {A(i) \cos\frac{\pi (i
                             -1/2)(k-1/2)}{n}}, k=1\ldots n$
                         </latex>
                     </para>
                             \sum_{i=1}^n {A(i) \cos\frac{\pi (i
                             -1/2)(k-1)}{n}}, k=1\ldots n \quad\text{with }
                             \omega(1)=\frac{1}{\sqrt{n}} \quad\text{and }
-                            \omega(k)=\sqrt{\frac{2}{n}} , k>1$ 
+                            \omega(k)=\sqrt{\frac{2}{n}} , k>1$
                         </latex>
                     </para>
                 </listitem>
                             $X(i) = \sum_{k=1}^n {\omega(k) A(k) \cos\frac{\pi (i
                             -1/2)(k-1)}{n}}, k=1\ldots n \quad\text{with }
                             \omega(1)=\frac{1}{\sqrt{n}} \quad\text{and }
-                            \omega(k)=\sqrt{\frac{2}{n}} , k>1$ 
+                            \omega(k)=\sqrt{\frac{2}{n}} , k>1$
                         </latex>
                     </para>
                 </listitem>
                     \text{with}\\
                     \omega_j(1)=\frac{1}{\sqrt{n_j}}\\
                     \omega_j(k)=\sqrt{\frac{2}{n_j}} , k>1
-                    \end{array}$ 
+                    \end{array}$
                 </latex>
             </para>
             <para>
                                     <para>
                                         <literal>X=dct(A,1 [,option])</literal> or
                                         <literal>X=idct(A [,option])</literal>performs the inverse
-                                        transform. 
+                                        transform.
                                     </para>
                                     <para>
                                         If <literal>A</literal> is a vector (only one
                                     For example, if <literal>A</literal> is a 3-D array
                                     <literal>X=dct(A,-1,2)</literal> is equivalent to:
                                 </para>
-                                <programlisting role=""><![CDATA[ 
+                                <programlisting role=""><![CDATA[
             for i1=1:size(A,1),
               for i3=1:size(A,3),
                 X(i1,:,i3)=dct(A(i1,:,i3),-1);
                                 <para>
                                     and <literal>X=dct(A,-1,[1 3])</literal> is equivalent to:
                                 </para>
-                                <programlisting role=""><![CDATA[ 
+                                <programlisting role=""><![CDATA[
             for i2=1:size(A,2),
               X(:,i2,:)=dct(A(:,i2,:),-1);
             end
                 the time computation when consecutives calls (with same
                 parameters) are performed.
             </para>
-            <para> 
+            <para>
                 It is possible to go further in dct optimization using
                 <link linkend="get_fftw_wisdom">get_fftw_wisdom</link>, <link
           linkend="set_fftw_wisdom">set_fftw_wisdom</link> functions.
     <refsection>
         <title>Examples</title>
         <para>1-D dct</para>
-        <programlisting role="example"><![CDATA[ 
+        <programlisting role="example"><![CDATA[
   //Frequency components of a signal
   //----------------------------------
-  // build a sampled at 1000hz  containing pure frequencies 
+  // build a sampled at 1000hz  containing pure frequencies
   // at 50 and 70 Hz
   sample_rate=1000;
   t = 0:1/sample_rate:0.6;
   ]]></programlisting>
         
         <para>2-D dct</para>
-        <programlisting role="example"><![CDATA[ 
+        <programlisting role="example"><![CDATA[
   x=-2:0.1:2;
   A=eval3d(milk_drop,x,x);
   d=dct(A);
index 948d771..59ff142 100644 (file)
@@ -3,19 +3,19 @@
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 1997   - INRIA
 * Copyright (C) 2012 - Serge Steer - INRIA
-* 
+*
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
-* are also available at    
+* are also available at
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 *
 -->
-<refentry xmlns="http://docbook.org/ns/docbook" 
-          xmlns:xlink="http://www.w3.org/1999/xlink" 
-          xmlns:svg="http://www.w3.org/2000/svg" 
-          xmlns:mml="http://www.w3.org/1998/Math/MathML" 
-          xmlns:db="http://docbook.org/ns/docbook" 
+<refentry xmlns="http://docbook.org/ns/docbook"
+          xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML"
+          xmlns:db="http://docbook.org/ns/docbook"
           xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="dst">
     <refnamediv>
         <refname>dst</refname>
@@ -76,7 +76,7 @@
                     vector of positive integers.  See the Description part for details.
                     <para>
                         Each element must be a divisor
-                        of the total number of elements of <literal>A</literal>. 
+                        of the total number of elements of <literal>A</literal>.
                     </para>
                     <para>
                         The product of the elements must be less than the total
         </variablelist>
     </refsection>
     <refsection>
-        <title>Description</title> 
+        <title>Description</title>
         <refsection>
-            <title>Transform description</title> 
+            <title>Transform description</title>
             <para>
                 This function realizes direct or
                 inverse 1-D or N-D Discrete Sine Transforms with shift depending on the <literal>option</literal> parameter value:
                     </para>
                     <para>
                         <latex>
-                            $X(k) = 2\sum_{i=1}^{n} {A(i) \cos\frac{\pi i k}{n+1}},
+                            $X(k) = 2 \sum_{i=1}^{n} {A(i) \cos\frac{\pi i k}{n+1}},
                             k=1\ldots n$
                         </latex>
                     </para>
                     </para>
                     <para>
                         <latex>
-                            $X(k) =2 \sum_{i=1}^{n} {A(i) \cos\frac{\pi ( i
+                            $X(k) = 2 \sum_{i=1}^{n} {A(i) \cos\frac{\pi ( i
                             -1/2) k}{n}}, k=1\ldots n$
                         </latex>
                     </para>
                     </para>
                     <para>
                         <latex>
-                            $X(k) = (-1)^{k-1}X(n)+ 2 \sum_{i=1}^{n-1} {A(i) \cos\frac{\pi  i (k-1/2)}{n}}, k=1\ldots n$
+                            $X(k) = (-1)^{k-1}A(n) + 2 \sum_{i=1}^{n-1} {A(i) \cos\frac{\pi  i (k-1/2)}{n}}, k=1\ldots n$
                         </latex>
                     </para>
                 </listitem>
                     </para>
                     <para>
                         <latex>
-                            $X(k) =2 \sum_{i=1}^{n} {A(i) \cos\frac{\pi (i
+                            $X(k) = 2 \sum_{i=1}^{n} {A(i) \cos\frac{\pi (i
                             -1/2)(k-1/2)}{n}}, k=1\ldots n$
                         </latex>
                     </para>
                                     <para>
                                         <literal>X=dst(A,1 [,option])</literal> or
                                         <literal>X=idst(A [,option])</literal>performs the inverse
-                                        transform. 
+                                        transform.
                                     </para>
                                     <para>
                                         If <literal>A</literal> is a vector (only one
                                     For example, if <literal>A</literal> is a 3-D array
                                     <literal>X=dst(A,-1,2)</literal> is equivalent to:
                                 </para>
-                                <programlisting role=""><![CDATA[ 
+                                <programlisting role=""><![CDATA[
             for i1=1:size(A,1),
               for i3=1:size(A,3),
                 X(i1,:,i3)=dst(A(i1,:,i3),-1);
                                 <para>
                                     and <literal>X=dst(A,-1,[1 3])</literal> is equivalent to:
                                 </para>
-                                <programlisting role=""><![CDATA[ 
+                                <programlisting role=""><![CDATA[
             for i2=1:size(A,2),
               X(:,i2,:)=dst(A(:,i2,:),-1);
             end
                 improves greatly the time computation when consecutives
                 calls (with same parameters) are performed.
             </para>
-            <para> 
+            <para>
                 It is possible to go further in dst optimization using
                 <link linkend="get_fftw_wisdom">get_fftw_wisdom</link>, <link
           linkend="set_fftw_wisdom">set_fftw_wisdom</link> functions.