<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry version="5.0-subset Scilab" xml:id="corr2" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns5="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook">
  <info>
    <pubdate>March, 2006</pubdate>
  </info>

  <refnamediv>
    <refname>corr2</refname>

    <refpurpose>2D correlation coefficient</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>Calling Sequence</title>

    <synopsis>c = corr2(imA, imB)</synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Parameters</title>

    <variablelist>
      <varlistentry>
        <term>imA, imB</term>

        <listitem>
           

          <literal>imA</literal>

           and 

          <literal>imB</literal>

           are 2D matrices of the same size. 
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>c</term>

        <listitem>
           Correlation coefficient, a scalar of class double. 
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>

  <refsection>
    <title>Description</title>

    <para><literal>corr2</literal> computes correlation coefficient of two 2D
    matrices <literal>imA</literal> and <literal>imB</literal>.</para>

    <para><literal>c = sum( (imA-mA).*(imB-mB) / sqrt(sum((imA-mA).^2) *
    sum((imB-mB).^2))</literal></para>

    <para><literal>mA=mean2(imA)</literal> and
    <literal>mB=mean2(imB)</literal></para>
  </refsection>

  <refsection>
    <title>Authors</title>

    <simplelist type="vert">
      <member>Shiqi Yu &lt;shiqi.yu[at]gmail.com&gt;</member>
    </simplelist>
  </refsection>

  <refsection>
    <title>Availability</title>

     The latest version of SIVP can be found at 

    <para>http://sivp.sf.net</para>

     
  </refsection>

  <refsection>
    <title>See Also</title>

    <simplelist type="inline">
      <member><link linkend="mean2">mean2</link></member>

      <member><link linkend="std2">std2</link></member>

      <member><link linkend="stdev2">stdev2</link></member>
    </simplelist>
  </refsection>
</refentry>
