<?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:ns4="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="pt">
    <refnamediv>
        <refname>ode_discrete</refname>
        <refpurpose>solucionador de equações diferenciais ordinárias, simulação de
            tempo discreto
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Seqüência de Chamamento</title>
        <synopsis>y=ode("discrete",y0,k0,kvect,f)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Parâmetros</title>
        <variablelist>
            <varlistentry>
                <term>y0</term>
                <listitem>
                    <para>vetor de reais ou matriz (condições iniciais).</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>t0</term>
                <listitem>
                    <para>escalar real (tempo inicial).</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>f</term>
                <listitem>
                    <para>função externa i.e. função, string ou lista.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>k0</term>
                <listitem>
                    <para>inteiro (tempo inicial).</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>kvect</term>
                <listitem>
                    <para>vetor de inteiros.</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Descrição</title>
        <para>Com esta sintaxe (primeiro argumento igual a
            <literal>"discrete"</literal>) <literal>ode</literal>, computa
            recursivamente <literal>y(k+1)=f(k,y(k))</literal> de um estado inicial
            <literal>y(k0)</literal> e retorna <literal>y(k)</literal> para
            <literal>k</literal> em <literal>kvect</literal>.
            <literal>kvect(1)</literal> deve ser maior do que ou igual a
            <literal>k0</literal>.
        </para>
        <para>Outros argumentos e opções são os mesmos que para
            <literal>ode</literal>, veja a página de ajuda de <link linkend="ode">ode</link>.
        </para>
    </refsection>
    <refsection>
        <title>Exemplos</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))

// Agora, y é avaliado em [y3,y5,y7,y9]
y=ode("discrete",y1,1,3:2:9,a_function)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>Ver Também</title>
        <simplelist type="inline">
            <member>
                <link linkend="ode">ode</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
