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

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

<refentry version="5.0-subset Scilab" xml:id="mpoles" 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>mpoles</refname>
    <refpurpose>Identify unique poles in p and their associated multiplicity.</refpurpose>
  </refnamediv>


<refsynopsisdiv>
   <title>Syntax</title>
   <synopsis>
   [multp, idxp] = mpoles(p)
   [multp, idxp] = mpoles(p, tol)
   [multp, idxp] = mpoles(p, tol, reorder)
   
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
        <varlistentry>
            <term>p:</term>
            <listitem><para> Vector of poles (single or double floating-point values).</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>tol:</term>
            <listitem><para> (optional) Tolerance for identifying multiple poles. If the relative difference of two poles is less than `tol`, they are considered multiples. Default is 0.001.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>reorder:</term>
            <listitem><para> (optional) Logical or numeric scalar. If `%t` (default), poles are sorted from largest to smallest magnitude. If `%f`, poles are not sorted.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>multp:</term>
            <listitem><para> Vector specifying the multiplicity of the poles. `multp(n)` refers to the multiplicity of the Nth pole `p(idxp(n))`.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>idxp:</term>
            <listitem><para> Indices of the poles in the original vector `p`, ordered by magnitude (if `reorder` is `%t`).</para></listitem>
        </varlistentry>
   </variablelist>
</refsection>

<refsection>
   <title>Description</title>
   <para>
The `mpoles` function identifies unique poles in the input vector `p` and determines their multiplicity. Poles are considered multiples if their relative difference is less than the specified tolerance `tol`. By default, the poles are sorted in descending order of magnitude. If `reorder` is set to `%f`, the poles are not sorted.
Notes
   </para>
   <para>
- If `tol` is not provided, the default value of 0.001 is used.
- If `reorder` is not provided, the poles are sorted by default.
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
// Identify unique poles and their multiplicity:
p = [2, 3, 1, 1, 2]
[m, n] = mpoles(p)

// Use a custom tolerance to identify multiples:
p = [1, 1.1, 1.3]
[m, n] = mpoles(p, 0.1 / 1.1)

[m, n] = mpoles(p, 0.1 / 1.1 + %eps)

// Disable sorting of poles:
p = [2, 3, 1, 1, 2]
[m, n] = mpoles(p, 0.001, %f)

   ]]></programlisting>
</refsection>

<refsection>
   <title>Authors</title>
   <simplelist type="vert">
   <member>FOSSEE Team</member>
   <member>toolbox@scilab.in</member>
   </simplelist>
</refsection>
</refentry>
