More examples for cacsd 22/10222/2
Sylvestre Ledru [Tue, 15 Jan 2013 16:24:41 +0000 (17:24 +0100)]
Change-Id: I18ca4ade60376b15c952fe122330651a309ea3b0

scilab/modules/cacsd/help/en_US/ric_desc.xml
scilab/modules/cacsd/help/en_US/riccati.xml
scilab/modules/cacsd/help/en_US/syssize.xml

index 2297feb..826ad44 100644 (file)
@@ -103,6 +103,15 @@ E=[eye(n,n),G;               H=[A, 0*ones(n,n);
             with <literal>G=B/R*B'</literal>
         </para>
     </refsection>
+    
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[ 
+h=[0.5,4;
+0,-0.5]
+x=ric_desc(h)
+ ]]></programlisting>
+    </refsection>
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index 11a73b1..63c4d4b 100644 (file)
@@ -76,6 +76,38 @@ A'*X*A-(A'*X*B1/(B2+B1'*X*B1))*(B1'*X*A)+C-X
             such that <literal>X=X1/X2</literal>.
         </para>
     </refsection>
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[
+// Continuous
+n = 10;
+A = rand(n,n);
+B = rand(n,n);
+C = rand(n,n);
+C = C*C';
+R = rand(n,n);
+R = R*R'+eye();
+B = B*inv(R)*B';
+
+
+X = riccati(A,B,C,'c','eigen')
+ ]]></programlisting>
+        <programlisting role="example"><![CDATA[
+// Discrete
+
+n = 10;
+F = rand(n,n);
+G1      = rand(n,n);
+G2 = rand(n,n);
+G2 = G2*G2'+eye();
+G      = G1/G2*G1';
+H      = rand(n,n);
+H = H*H';
+
+[X1,X2]= riccati(F,G,H,'d','schur')
+ ]]></programlisting>
+    </refsection>
+    
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
index 0eb8255..71909e4 100644 (file)
             of the linear system <literal>Sl</literal>. <literal>nx</literal> is the number of states of <literal>Sl</literal>.
         </para>
     </refsection>
+    
+    <refsection>
+        <title>Examples</title>
+        <programlisting role="example"><![CDATA[
+
+a=[-2.2567e-02  -36.617  -18.897  -32.090  3.2509  -7.6257e-1;
+  9.2572e-05  -1.8997  9.8312e-01  -7.2562e-04  -1.7080e-01  -4.9652e-03;
+    1.2338e-02  11.720  -2.6316  8.7582e-04  -31.604  22.396;
+    0           0        1       0            0       0  ;
+    0           0        0       0           -30      0  ;
+    0           0        0       0            0      -30  ];
+
+b=0*ones(6,2);
+b(5,1)=30;
+b(6,2)=30;
+c=0*ones(2,6);
+c(1,2)=1;
+c(2,4)=1;
+G=syslin('c',a,b,c);
+r=syssize(G)
+   ]]></programlisting>
+        
+    </refsection>
+    
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">