To add a precision to conv and conv2 help pages 24/5924/2
steer [Fri, 13 Jan 2012 16:30:44 +0000 (17:30 +0100)]
Change-Id: I5a3b7f13a7f5e26188c0e0a31905853620cb4cb7

scilab/modules/signal_processing/help/en_US/conv.xml
scilab/modules/signal_processing/help/en_US/conv2.xml

index 3f1c924..e61258b 100644 (file)
@@ -1,7 +1,5 @@
+
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Add some comments about XML file
--->
 <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" version="5.0-subset Scilab" xml:lang="en_US" xml:id="conv">
   <info>
     <pubdate>$LastChangedDate: 30-12-2011 $</pubdate>
             an optional character string with possible values:
           </para>
           <itemizedlist>
-            <listitem><literal>"full"</literal>, <literal>conv</literal>
+            <listitem>
+              <literal>"full"</literal>, <literal>conv</literal>
               computes the full convolution. It is the
               default value.
             </listitem>
-            <listitem><literal>"same"</literal>, <literal>conv</literal>
+            <listitem>
+              <literal>"same"</literal>, <literal>conv</literal>
               computes the central part of the convolution of the same
               size as <literal>A</literal>.
             </listitem>
-            <listitem><literal>"valid"</literal>, <literal>conv</literal>
+            <listitem>
+              <literal>"valid"</literal>, <literal>conv</literal>
               computes the convolution parts without the zero-padding
               of <literal>A</literal>.
             </listitem>
   </refsection>
   <refsection>
     <title>Description</title>
-    <para><literal>conv</literal> uses a straightforward formal
-       implementation of the one-dimensional convolution equation in
-       spatial form.
+    <para>
+      <literal>conv</literal> uses a straightforward formal
+      implementation of the one-dimensional convolution equation in
+      spatial form.
     </para>
-    <para><literal>C=conv(A,B [,shape])</literal> computes the
+    <para>
+      <literal>C=conv(A,B [,shape])</literal> computes the
       one-dimensional convolution of the vectors <literal>A</literal>
-    and <literal>B</literal>:</para>
+      and <literal>B</literal>:
+    </para>
     <itemizedlist>
-      <listitem> With <literal>shape=="full"</literal> the
-      dimensions of the result<literal>C</literal> are given by
-      <literal>size(A,'*')+size(B,'*')+1</literal>. The indices of the
-      center element of <literal>B</literal> are defined as
-      <literal>floor((size(B,'*')+1)/2)</literal>.
+      <listitem>
+        With <literal>shape=="full"</literal> the
+        dimensions of the result<literal>C</literal> are given by
+        <literal>size(A,'*')+size(B,'*')+1</literal>. The indices of the
+        center element of <literal>B</literal> are defined as
+        <literal>floor((size(B,'*')+1)/2)</literal>.
       </listitem>
-      <listitem> With <literal>shape=="same"</literal> the
-      dimensions of the result<literal>C</literal> are given by
-      <literal>size(A)</literal>. The indices of the
-      center element of <literal>B</literal> are defined as
-      <literal>floor((size(B,'*')+1)/2)</literal>.
+      <listitem>
+        With <literal>shape=="same"</literal> the
+        dimensions of the result<literal>C</literal> are given by
+        <literal>size(A)</literal>. The indices of the
+        center element of <literal>B</literal> are defined as
+        <literal>floor((size(B,'*')+1)/2)</literal>.
       </listitem>
-      <listitem> With <literal>shape=="valid"</literal> the dimensions
-      of the result <literal>C</literal> are given by
-      <literal>size(A,'*')-size(B,'*')+1)</literal> if
-      <literal>and(size(A,'*')-size(B,'*'))&gt;=0</literal> else
-      <literal>C</literal> is empty . The indices of the center
-      element of <literal>B</literal> are defined as
-      <literal>1</literal>.
+      <listitem>
+        With <literal>shape=="valid"</literal> the dimensions
+        of the result <literal>C</literal> are given by
+        <literal>size(A,'*')-size(B,'*')+1)</literal> if
+        <literal>and(size(A,'*')-size(B,'*'))&gt;=0</literal> else
+        <literal>C</literal> is empty . The indices of the center
+        element of <literal>B</literal> are defined as
+        <literal>1</literal>.
       </listitem>
     </itemizedlist>
+    <para>
+      Note that <link linkend="convol">convol</link> can be more efficient for large arrays.
+    </para>
   </refsection>
   <refsection>
     <title>Examples</title>
   <refsection>
     <title>Used Functions</title>
     <para>
-         The conv function is based on the  <link linkend="conv2">conv2</link> builtin.
-       </para>
+      The conv function is based on the  <link linkend="conv2">conv2</link> builtin.
+    </para>
   </refsection>
   <refsection>
     <title>History</title>
index 3962809..54a7db2 100644 (file)
@@ -1,7 +1,5 @@
+
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Add some comments about XML file
--->
 <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" version="5.0-subset Scilab" xml:lang="en_US" xml:id="conv2">
   <info>
     <pubdate>$LastChangedDate: 29-12-2011 $</pubdate>
@@ -13,8 +11,8 @@
   <refsynopsisdiv>
     <title>Calling Sequence</title>
     <synopsis>
-    C = conv2(A,B [,shape])
-    C = conv2(hrow,hcol,B [,shape])
+      C = conv2(A,B [,shape])
+      C = conv2(hrow,hcol,B [,shape])
     </synopsis>
   </refsynopsisdiv>
   <refsection>
             an optional character string with possible values:
           </para>
           <itemizedlist>
-            <listitem><literal>"full"</literal>, <literal>conv2</literal>
+            <listitem>
+              <literal>"full"</literal>, <literal>conv2</literal>
               computes the full two-dimensional convolution. It is the
               default value.
             </listitem>
-            <listitem><literal>"same"</literal>, <literal>conv2</literal>
+            <listitem>
+              <literal>"same"</literal>, <literal>conv2</literal>
               computes the central part of the convolution of the same
               size as <literal>A</literal>.
             </listitem>
-            <listitem><literal>"valid"</literal>, <literal>conv2</literal>
+            <listitem>
+              <literal>"valid"</literal>, <literal>conv2</literal>
               computes the convolution parts without the zero-padding of <literal>A</literal>. 
             </listitem>
           </itemizedlist>
       </varlistentry>
     </variablelist>
   </refsection>
-  <refsection><title>Description</title><para><literal>conv2</literal> uses a straightforward formal
-       implementation of the two-dimensional convolution equation in
-       spatial form.
-    </para><para><literal>C=conv2(A,B [,shape])</literal> computes the
+  <refsection>
+    <title>Description</title>
+    <para>
+      <literal>conv2</literal> uses a straightforward formal
+      implementation of the two-dimensional convolution equation in
+      spatial form.
+    </para>
+    <para>
+      <literal>C=conv2(A,B [,shape])</literal> computes the
       two-dimensional convolution of the arrays <literal>A</literal>
-    and <literal>B</literal>:</para><itemizedlist><listitem> With <literal>shape=="full"</literal> the
-      dimensions of the result<literal>C</literal> are given by
-      <literal>size(A)+size(B)+1</literal>. The indices of the
-      center element of <literal>B</literal> are defined as
-      <literal>floor((size(B)+1)/2)</literal>.
-      </listitem><listitem> With <literal>shape=="same"</literal> the
-      dimensions of the result<literal>C</literal> are given by
-      <literal>size(A)</literal>. The indices of the
-      center element of <literal>B</literal> are defined as
-      <literal>floor((size(B)+1)/2)</literal>.
-      </listitem><listitem> With <literal>shape=="valid"</literal> the dimensions
-      of the result <literal>C</literal> are given by
-      <literal>size(A)-size(B)+1)</literal> if
-      <literal>and(size(A)-size(B))&gt;=0</literal> else
-      <literal>C</literal> is empty . The indices of the center
-      element of <literal>B</literal> are defined as
-      <literal>[1 1]</literal>.
-      </listitem></itemizedlist><para>
-      The separable form <literal>C=conv2(hrow,hcol,B [,shape])</literal>is equivalent to <literal>C=conv2(hrow(:)*hcol(:).',B [,shape])</literal></para>.
+      and <literal>B</literal>:
+    </para>
+    <itemizedlist>
+      <listitem>
+        With <literal>shape=="full"</literal> the
+        dimensions of the result<literal>C</literal> are given by
+        <literal>size(A)+size(B)+1</literal>. The indices of the
+        center element of <literal>B</literal> are defined as
+        <literal>floor((size(B)+1)/2)</literal>.
+      </listitem>
+      <listitem>
+        With <literal>shape=="same"</literal> the dimensions
+        of the result<literal>C</literal> are given by
+        <literal>size(A)</literal>. The indices of the center element of
+        <literal>B</literal> are defined as
+        <literal>floor((size(B)+1)/2)</literal>.
+      </listitem>
+      <listitem>
+        With <literal>shape=="valid"</literal> the dimensions
+        of the result <literal>C</literal> are given by
+        <literal>size(A)-size(B)+1)</literal> if
+        <literal>and(size(A)-size(B))&gt;=0</literal> else
+        <literal>C</literal> is empty . The indices of the center
+        element of <literal>B</literal> are defined as <literal>[1
+          1]
+        </literal>
+        .
+      </listitem>
+    </itemizedlist>
+    <para>
+      The separable form <literal>C=conv2(hrow,hcol,B [,shape])</literal>is equivalent to <literal>C=conv2(hrow(:)*hcol(:).',B [,shape])</literal>
+    </para>
+    .
+    <para>
+      Note that <link linkend="convol2d">convol2d</link> can be more efficient for large arrays.
+    </para>
   </refsection>
   <refsection>
     <title>Examples</title>