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

<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008 - INRIA
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->

<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="companion">

    <refnamediv>

        <refname>companion</refname>

        <refpurpose>コンパニオン行列 </refpurpose>

    </refnamediv>

    <refsynopsisdiv>

        <title>呼び出し手順</title>

        <synopsis>A=companion(p)</synopsis>

    </refsynopsisdiv>

    <refsection>

        <title>引数</title>

        <variablelist>

            <varlistentry>

                <term>p</term>

                <listitem>

                    <para>多項式または多項式のベクトル</para>

                </listitem>

            </varlistentry>

            <varlistentry>

                <term>A</term>

                <listitem>

                    <para>正方行列</para>

                </listitem>

            </varlistentry>

        </variablelist>

    </refsection>

    <refsection>

        <title>説明</title>

        <para>

            特性多項式を有する

            行列<literal>A</literal>を返します.

            <literal>p</literal>がモニックな場合,特性多項式は

            <literal>p</literal>に等しくなります.

            <literal>p</literal>がモニックでない場合,

            <literal>A</literal>の特性方程式は

            <literal>p/c</literal>に等しくなります.

            ただし,<literal>c</literal>は<literal>p</literal>

            の最大次数の係数です.

        </para>

        <para>

            <literal>p</literal> がモニックな多項式のベクトルの場合,

            <literal>A</literal> はブロック対角となり,

            i番目の特性多項式は

            <literal>p(i)</literal>となります.

        </para>

    </refsection>

    <refsection>

        <title>例</title>

        <programlisting role="example"><![CDATA[
s=poly(0,'s');
p=poly([1,2,3,4,1],'s','c')
det(s*eye(4,4)-companion(p))
roots(p)
spec(companion(p))
 ]]></programlisting>

    </refsection>

    <refsection role="see also">

        <title>参照</title>

        <simplelist type="inline">

            <member>

                <link linkend="spec">spec</link>

            </member>

            <member>

                <link linkend="poly">poly</link>

            </member>

            <member>

                <link linkend="randpencil">randpencil</link>

            </member>

        </simplelist>

    </refsection>

</refentry>

