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

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

<refentry version="5.0-subset Scilab" xml:id="sos2cell" 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>sos2cell</refname>
    <refpurpose>Convert a second-order section matrix to a cell array representation.</refpurpose>
  </refnamediv>


<refsynopsisdiv>
   <title>Syntax</title>
   <synopsis>
   cll = sos2cell(s)
   cll = sos2cell(s, g)
   
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
        <varlistentry>
            <term>s:</term>
            <listitem><para> Second-order section matrix (L-by-6 matrix).</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>- Must have exactly 6 columns in the format:</term>
            <listitem><para> [b0 b1 b2 a0 a1 a2].</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>g:</term>
            <listitem><para> Gain factor (optional).</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>cll:</term>
            <listitem><para> Cell array containing second-order sections.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>- For unity-gain systems (no gain specified):</term>
            <listitem><para> </para></listitem>
        </varlistentry>
        <varlistentry>
            <term>Cell array with L elements. Each element contains coefficients:</term>
            <listitem><para> {[b0 b1 b2] [a0 a1 a2]}.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>- For non-unity gain systems:</term>
            <listitem><para> </para></listitem>
        </varlistentry>
        <varlistentry>
            <term>Cell array with L+1 elements. The first element contains the gain:</term>
            <listitem><para> {g 1}. The remaining elements contain section coefficients.</para></listitem>
        </varlistentry>
   </variablelist>
</refsection>

<refsection>
   <title>Description</title>
   <para>
The `sos2cell` function converts a second-order section matrix to a cell array representation.
It supports both unity-gain and non-unity gain filter systems. For non-unity gain systems, the gain factor is stored in the first cell of the output array.
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
// Convert a second-order section matrix to a cell array (unity gain):
sos = [3. 6. 7. 1. 1. 2. ; 1. 4. 5. 1. 9. 3. ; 2. 7. 1. 1. 7. 8.]
cll = sos2cell(sos)

   ]]></programlisting>
</refsection>

<refsection>
   <title>Authors</title>
   <simplelist type="vert">
   <member>Abinash Singh</member>
   </simplelist>
</refsection>
</refentry>
