<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://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:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="ode_discrete" xml:lang="ja">
    <refnamediv>
        <refname>ode_discrete</refname>
        <refpurpose>常微分方程式ソルバ,
            離散時間シミュレーション
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>呼び出し手順</title>
        <synopsis>y = ode("discrete",y0,k0,kvect,f)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>引数</title>
        <variablelist>
            <varlistentry>
                <term>y0</term>
                <listitem>
                    <para>実数のベクトルまたは行列 (初期条件).</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>t0</term>
                <listitem>
                    <para>実数スカラー (初期時間).</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>f</term>
                <listitem>
                    <para>外部 (関数または文字列またはリスト).</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>k0</term>
                <listitem>
                    <para>整数 (初期時間).</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>kvect</term>
                <listitem>
                    <para>整数ベクトル.</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>説明</title>
        <para>
            (最初の引数を<literal>"discrete"</literal>とする )
            この構文により,<literal>ode</literal>は
            初期状態量 <literal>y(k0)</literal> から再帰的に
            <literal>y(k+1)=f(k,y(k))</literal>を計算し,
            <literal>kvect</literal>の中にある<literal>k</literal>について
            <literal>y(k)</literal>を返します.
            <literal>kvect(1)</literal> は<literal>k0</literal>以上である
            必要があります.
        </para>
        <para>他の引数およびその他のオプションは
            <literal>ode</literal>と同じです.
            <link linkend="ode">ode</link>のヘルプを参照ください.
        </para>
    </refsection>
    <refsection>
        <title>例</title>
        <programlisting role="example"><![CDATA[
y1 = [1;2;3];
deff("yp = a_function(k,y)", "yp = A*y + B*u(k)")
A = diag([0.2,0.5,0.9]);  B = [1;1;1];  u = 1:10;  n = 5;
y = ode("discrete", y1, 1, 1:n, a_function);
y(:,2) - (A*y1+B*u(1))

// ここで, [y3,y5,y7,y9] で y を評価します
y = ode("discrete", y1, 1, 3:2:9, a_function)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>参照</title>
        <simplelist type="inline">
            <member>
                <link linkend="ode">ode</link>
            </member>
        </simplelist>
    </refsection>
</refentry>