<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 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="en" xml:id="obs_gram">
    <refnamediv>
        <refname>obs_gram</refname>
        <refpurpose>observability gramian</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            Go = obs_gram(sl)
            Go = obs_gram(A, C)
            Go = obs_gram(A, C, dom)
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>A,C</term>
                <listitem>
                    <para>real matrices (of appropriate dimensions)</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>dom</term>
                <listitem>
                    <para>
                        string (<literal>"d'</literal> or <literal>"c"</literal> (default value))
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>sl</term>
                <listitem>
                    <para>
                        <literal>syslin</literal> list
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            Observability gramian of the pair <literal>(A,C)</literal> or linear
            system <literal>sl</literal> (<literal>syslin</literal> list).
            <literal>dom</literal> is the domain which can be
        </para>
        <variablelist>
            <varlistentry>
                <term>"c"</term>
                <listitem>
                    <para> continuous system (default)</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>"d"</term>
                <listitem>
                    <para> discrete system</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
A=-diag(1:3);C=rand(2,3);
Go=obs_gram(A,C,'c');     // <=> w=syslin('c',A,[],C); Go=obs_gram(w);
norm(Go*A+A'*Go+C'*C,1)
norm(lyap(A,-C'*C,'c')-Go,1)
A=A/4; Go=obs_gram(A,C,'d');    //discrete time case
norm(lyap(A,-C'*C,'d')-Go,1)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="ctr_gram">ctr_gram</link>
            </member>
            <member>
                <link linkend="obsvss">obsvss</link>
            </member>
            <member>
                <link linkend="obsv_mat">obsv_mat</link>
            </member>
            <member>
                <link linkend="lyap">lyap</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
