<?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * This help file was generated from cpsd.sci using help_from_sci().
 *
 -->

<refentry version="5.0-subset Scilab" xml:id="cpsd" 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:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:scilab="http://www.scilab.org"
          xmlns:db="http://docbook.org/ns/docbook">

  <refnamediv>
    <refname>cpsd</refname>
    <refpurpose>Estimate the cross power spectrum of data using the Welch method.</refpurpose>
  </refnamediv>


<refsynopsisdiv>
   <title>Syntax</title>
   <synopsis>
   [Pxx, freq] = cpsd(x, y)
   [...] = cpsd(x, y, window)
   [...] = cpsd(x, y, window, overlap)
   [...] = cpsd(x, y, window, overlap, Nfft)
   [...] = cpsd(x, y, window, overlap, Nfft, Fs)
   [...] = cpsd(x, y, window, overlap, Nfft, Fs, range)
   cpsd(...)
   
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
        <varlistentry>
            <term>x, y:</term>
            <listitem><para> Vectors. Input signals for cross power spectrum estimation.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>window:</term>
            <listitem><para> Vector. Windowing function applied to each segment.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>overlap:</term>
            <listitem><para> Integer. Number of overlapping samples between segments.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>Nfft:</term>
            <listitem><para> Integer. Number of FFT points.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>Fs:</term>
            <listitem><para> Real scalar. Sampling frequency.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>range:</term>
            <listitem><para> String. Frequency range for the analysis.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>Pxx:</term>
            <listitem><para> Vector. Cross power spectrum estimate.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>freq:</term>
            <listitem><para> Vector. Frequency values corresponding to the cross power spectrum estimate.</para></listitem>
        </varlistentry>
   </variablelist>
</refsection>

<refsection>
   <title>Description</title>
   <para>
This function estimates the cross power spectrum of data `x` and `y` using the Welch periodogram/FFT method. It is compatible with Matlab's `cpsd` function.
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
t = linspace(0,10,1000);
x = sin(t) ;
y = cos(t);
cpsd(x,y)
   ]]></programlisting>
</refsection>
</refentry>
