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

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

<refentry version="5.0-subset Scilab" xml:id="ellipord" 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>ellipord</refname>
    <refpurpose>Compute the minimum filter order of a digital elliptic or Cauer filter with the desired response characteristics.</refpurpose>
  </refnamediv>


<refsynopsisdiv>
   <title>Syntax</title>
   <synopsis>
   [n] = ellipord(Wp, Ws, Rp, Rs)
   [n, Wp] = ellipord(Wp, Ws, Rp, Rs)
   
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
        <varlistentry>
            <term>Wp:</term>
            <listitem><para> Scalar or vector of length 2. Specifies the passband edge(s). All elements must be in the range [0, 1].</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>Ws:</term>
            <listitem><para> Scalar or vector of length 2. Specifies the stopband edge(s). All elements must be in the range [0, 1].</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>Rp:</term>
            <listitem><para> Non-negative scalar. The passband ripple in decibels (dB).</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>Rs:</term>
            <listitem><para> Non-negative scalar. The stopband attenuation in decibels (dB).</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>n:</term>
            <listitem><para> Positive integer. The minimum order of the filter satisfying the given specifications.</para></listitem>
        </varlistentry>
   </variablelist>
</refsection>

<refsection>
   <title>Description</title>
   <para>
This function computes the minimum filter order of an elliptic filter with the desired response characteristics.
- Stopband frequency `Ws` and passband frequency `Wp` specify the filter frequency band edges.
- Frequencies are normalized to the Nyquist frequency in the range [0, 1].
- `Rp` is measured in decibels and represents the allowable passband ripple.
- `Rs` is measured in decibels and represents the minimum attenuation in the stopband.
- If `Ws &gt; Wp`, the filter is a lowpass filter. If `Wp &gt; Ws`, the filter is a highpass filter.
- If `Wp` and `Ws` are vectors of length 2, the passband interval is defined by `Wp` and the stopband interval is defined by `Ws`.
- If `Wp` is contained within the lower and upper limits of `Ws`, the filter is a bandpass filter.
- If `Ws` is contained within the lower and upper limits of `Wp`, the filter is a bandstop or band-reject filter.
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
// Bandpass filter:
Wp = [60 200]/500
Ws = [50 250]/500
Rp = 3
Rs = 40
[n, Wp] = ellipord(Wp, Ws, Rp, Rs)

   ]]></programlisting>
</refsection>
</refentry>
