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

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

<refentry version="5.0-subset Scilab" xml:id="spectral_xdf" 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>spectral_xdf</refname>
    <refpurpose>Compute the spectral density estimator using a data vector.</refpurpose>
  </refnamediv>


<refsynopsisdiv>
   <title>Syntax</title>
   <synopsis>
   sde = spectral_xdf(x)
   sde = spectral_xdf(x, win)
   sde = spectral_xdf(x, win, b)
   
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
        <varlistentry>
            <term>x:</term>
            <listitem><para> Data vector.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>win:</term>
            <listitem><para> (optional) The window name. Default is "triangle". Supported values are "triangle" and "rectangle".</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>b:</term>
            <listitem><para> (optional) Bandwidth. Default is 1 / sqrt(length(x)).</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>sde:</term>
            <listitem><para> Spectral density estimator.</para></listitem>
        </varlistentry>
   </variablelist>
</refsection>

<refsection>
   <title>Description</title>
   <para>
The `spectral_xdf` function computes the spectral density estimator given a data vector `x`, a window name `win`, and a bandwidth `b`.
The window name is used to search for a function called `win_sw` (e.g., "triangle" or "rectangle"). If `win` is omitted, the triangle window is used.
If `b` is omitted, 1 / sqrt(length(x)) is used.
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
// Compute the spectral density estimator with default parameters:
x = [1, 2, 3, 4, 5]
sde = spectral_xdf(x)

   ]]></programlisting>
</refsection>

<refsection role="see also">
   <title>See also</title>
   <simplelist type="inline">
   <member><link linkend="fft1">fft1</link></member>
   <member><link linkend="ifft1">ifft1</link></member>
   </simplelist>
</refsection>
</refentry>
