* Bug 16257: obsoleting sysdiag() 81/21181/7
Samuel GOUGEON [Fri, 20 Dec 2019 22:17:30 +0000 (23:17 +0100)]
  http://bugzilla.scilab.org/16257

Change-Id: I30ee59a678a753dcab4f346101e742af70523640

59 files changed:
scilab/CHANGES.md
scilab/modules/cacsd/demos/lqg/lqg.dem
scilab/modules/cacsd/demos/lqg/lqg2.dem
scilab/modules/cacsd/demos/mixed.dem
scilab/modules/cacsd/help/en_US/control_design/control_loop/augment.xml
scilab/modules/cacsd/help/en_US/control_design/control_loop/feedback.xml
scilab/modules/cacsd/help/en_US/control_design/control_loop/lft.xml
scilab/modules/cacsd/help/en_US/control_design/linear_quadratic/lqe.xml
scilab/modules/cacsd/help/en_US/control_design/linear_quadratic/lqg.xml
scilab/modules/cacsd/help/en_US/control_design/linear_quadratic/lqi.xml
scilab/modules/cacsd/help/en_US/linear_system_representation/ss2ss.xml
scilab/modules/cacsd/help/en_US/linear_system_representation/sysdiag.xml
scilab/modules/cacsd/help/en_US/model_transformation/equil1.xml
scilab/modules/cacsd/help/ja_JP/control_design/control_loop/augment.xml
scilab/modules/cacsd/help/ja_JP/control_design/control_loop/feedback.xml
scilab/modules/cacsd/help/ja_JP/control_design/control_loop/lft.xml
scilab/modules/cacsd/help/ja_JP/linear_system_representation/ss2ss.xml
scilab/modules/cacsd/help/ja_JP/linear_system_representation/sysdiag.xml
scilab/modules/cacsd/help/ja_JP/model_transformation/equil1.xml
scilab/modules/cacsd/help/pt_BR/linear_system_representation/sysdiag.xml
scilab/modules/cacsd/help/ru_RU/linear_system_representation/sysdiag.xml
scilab/modules/cacsd/macros/abinv.sci
scilab/modules/cacsd/macros/lqg.sci
scilab/modules/cacsd/macros/observer.sci
scilab/modules/cacsd/macros/ss2ss.sci
scilab/modules/cacsd/macros/ssrand.sci
scilab/modules/cacsd/macros/sysdiag.sci
scilab/modules/cacsd/tests/nonreg_tests/bug_13750.dia.ref [deleted file]
scilab/modules/cacsd/tests/nonreg_tests/bug_13750.tst
scilab/modules/cacsd/tests/nonreg_tests/bug_4731.dia.ref [deleted file]
scilab/modules/cacsd/tests/nonreg_tests/bug_4731.tst
scilab/modules/cacsd/tests/unit_tests/lqg.dia.ref [deleted file]
scilab/modules/cacsd/tests/unit_tests/lqg.tst
scilab/modules/cacsd/tests/unit_tests/lqi.dia.ref [deleted file]
scilab/modules/cacsd/tests/unit_tests/lqi.tst
scilab/modules/cacsd/tests/unit_tests/lqr.dia.ref [deleted file]
scilab/modules/cacsd/tests/unit_tests/lqr.tst
scilab/modules/elementary_functions/help/en_US/elementarymatrices/diag.xml
scilab/modules/elementary_functions/help/fr_FR/elementarymatrices/diag.xml
scilab/modules/elementary_functions/help/ja_JP/elementarymatrices/diag.xml
scilab/modules/elementary_functions/help/pt_BR/elementarymatrices/diag.xml
scilab/modules/elementary_functions/help/ru_RU/elementarymatrices/diag.xml
scilab/modules/linear_algebra/help/en_US/eigen/bdiag.xml
scilab/modules/linear_algebra/help/en_US/eigen/projspec.xml
scilab/modules/linear_algebra/help/fr_FR/eigen/bdiag.xml
scilab/modules/linear_algebra/help/ja_JP/eigen/bdiag.xml
scilab/modules/linear_algebra/help/ja_JP/eigen/projspec.xml
scilab/modules/linear_algebra/help/pt_BR/eigen/bdiag.xml
scilab/modules/linear_algebra/help/pt_BR/eigen/projspec.xml
scilab/modules/linear_algebra/macros/companion.sci
scilab/modules/linear_algebra/macros/eigenmarkov.sci
scilab/modules/linear_algebra/macros/genmarkov.sci
scilab/modules/linear_algebra/macros/randpencil.sci
scilab/modules/linear_algebra/macros/spantwo.sci
scilab/modules/optimization/help/en_US/semidefprog/semidef.xml
scilab/modules/optimization/macros/lmisolver.sci
scilab/modules/optimization/tests/unit_tests/semidef.tst
scilab/modules/overloading/macros/%lss_m_s.sci
scilab/modules/slint/src/cpp/DeprecatedChecker.cpp

index 2c7ca15..c46c336 100644 (file)
@@ -158,6 +158,7 @@ Obsolete functions or features
 * `champ1()` is obsolete. Please use `champ.colored` instead.
 * `setPreferencesValue` will be removed from Scilab 6.1.x. Please use `xmlSetValues` instead.
 * `%sn()` is obsolete. Please use `ellipj()` instead.
+* `sysdiag()` is obsolete. Please use `blockdiag()` instead.
 
 
 Removed Functions
index 52efc76..8f6e20a 100644 (file)
@@ -60,7 +60,7 @@ function demo_lqg()
     Plant=syslin('d',Plant);
     mode(-1)
   end
-  
+
   mode(1)
 
   //Nominal Plant
@@ -74,23 +74,23 @@ function demo_lqg()
   rep=x_matrix('u-weighting matrix',eye(nu,nu));
   if rep==[] then return,end
   Qu=evstr(rep);
-  bigQ=sysdiag(Qx,Qu);
+  bigQ=blockdiag(Qx,Qu);
   rep=x_matrix('x-noise covariance matrix',eye(nx,nx))
   if rep==[] then return,end
   Rx=evstr(rep);
   rep=x_matrix('y-noise covariance matrix',eye(ny,ny))
   if rep==[] then return,end
   Ry=evstr(rep);
-  bigR=sysdiag(Rx,Ry);
+  bigR=blockdiag(Rx,Ry);
   [Plqg,r]=lqg2stan(P22,bigQ,bigR);     //LQG pb as a standard problem
   Klqg=lqg(Plqg,r);                     //LQG compensator
-  
+
   disp(spec(h_cl(Plqg,r,Klqg)),'closed loop eigenvalues:');    //Check internal stability
   [Slqg,Rlqg,Tlqg]=sensi(P22,Klqg);  //Sensitivity functions
 
   disp(clean(ss2tf(Slqg)),'Sensitivity function');
   disp(clean(ss2tf(Tlqg)),'Complementary sensitivity function');
-  
+
   mode(-1);
 
   messagebox('Closed-loop response',"modal");
index 1f13001..6403db5 100644 (file)
@@ -19,7 +19,7 @@ function demo_lqg2()
   Klqg=lqg(Plqg,r);          //Controller
   spec(h_cl(Plqg,r,Klqg))    //Check internal stability
   [Slqg,Rlqg,Tlqg]=sensi(P22,Klqg);  //Sensitivity functions
-  frq=logspace(-3,3);     //10^-3  to 10^3 
+  frq=logspace(-3,3);     //10^-3  to 10^3
   y=svplot(Slqg);       //Computes singular values;
   clf();
   scf(100001);
@@ -27,7 +27,7 @@ function demo_lqg2()
   w1=1/(s+1);
   w2=100;
   [Ptmp,r]=augment(P22,'SR');         //"S/KS" problem
-  Pinf=sysdiag(w1,w2,1)*Ptmp;        //Weighting functions
+  Pinf=blockdiag(w1,w2,1)*Ptmp;        //Weighting functions
   [Kinf,ro]=h_inf(Pinf,r,0,0.1,50);
   [Sinf,Rinf,Tinf]=sensi(P22,Kinf);  //Sensitivity functions
   y=svplot(Sinf);       //Computes singular values;
@@ -37,8 +37,8 @@ function demo_lqg2()
 
   clf();t=0:0.01:30;u=sin(t);
   plot2d([t',t'],[u',(flts(u,dscr(Tlqg,0.1))')])
-  
+
 endfunction
-  
+
 demo_lqg2();
-clear demo_lqg2  
\ No newline at end of file
+clear demo_lqg2
\ No newline at end of file
index 26db4f7..04efed2 100644 (file)
@@ -14,7 +14,7 @@ function demo_mixed()
 
   xx=[xmin,xmin,x([1 2 2 7 4 6 3 4 5 6 3 3 5 5]);xmax,xmax,x([3,2,7,7,5,8,3,4,5,6,4,4,6,6])];
   yy=[ymin,ymax,y([3,1,1,1,3,3,2,2,2,2,2,4,2,4]);ymin,ymax,y([3,3,1,3,3,3,4,4,4,4,2,4,2,4])];
-    
+
   scf(100001);clf();show_window();
   plot2d(xx,yy,ones(1,16),'022');
   xstring(28,30,'K');xstring(56,30,'Plant');xstring(12,28.80,'-');
@@ -41,7 +41,7 @@ function demo_mixed()
     if rep==[] then return;end
     W1=evstr(rep(1));W2=evstr(rep(2));W3=evstr(rep(3));
     default=rep;
-    Pms=sysdiag(W1,W2,W3,eye(P22))*Pms;
+    Pms=blockdiag(W1,W2,W3,eye(P22))*Pms;
     gms=['gamma min= ';'gamma max= ';'# iterations'];
     vals=['0.01';'1000';'50'];
     reps=x_mdialog('Set interval for gamma and #iterations',gms,vals);
@@ -59,7 +59,7 @@ function demo_mixed()
   fcts=['S function';'R (=K*S) function';'T function'];
   www=x_mdialog('Select sensitivity function',fcts,['Yes';'No';'Yes']);
   if www==[] then return,end
-  
+
   ww1=part(www(1),1)=='Y';
   if ww1 then
     scf(100002);clf();show_window();
index 6660846..67e8a4e 100644 (file)
@@ -113,7 +113,7 @@ P = [ 0 |  I]   -->'T'  (K*G*input sensitivity)
         <para>
             Note that weighting functions can be introduced by left-multiplying
             <literal>P</literal> by a diagonal system of appropriate dimension, e.g.,
-            <literal> P = sysdiag(W1,W2,W3,eye(G))*P</literal>.
+            <literal> P = blockdiag(W1,W2,W3,eye(G))*P</literal>.
         </para>
         <para>
             Sensitivity functions can be calculated by <literal>lft</literal>. One has:
index bcbc61b..43c110c 100644 (file)
@@ -69,7 +69,7 @@ ss2tf(S1/.S2)
 //Same operation by LFT:
 ss2tf(lft([zeros(2,2),eye(2,2);eye(2,2),-S2],S1))
 //Other approach: with constant feedback
-BigS=sysdiag(S1,S2); F=[zeros(2,2),eye(2,2);-eye(2,2),zeros(2,2)];
+BigS=blockdiag(S1,S2); F=[zeros(2,2),eye(2,2);-eye(2,2),zeros(2,2)];
 Bigclosed=BigS/.F;
 W1=Bigclosed(1:2,1:2);   //W1=W (in state-space).
 ss2tf(W1)
@@ -84,7 +84,7 @@ ss2tf(S1*inv(eye()+S2*S1))
                 <link linkend="lft">lft</link>
             </member>
             <member>
-                <link linkend="sysdiag">sysdiag</link>
+                <link linkend="blockdiag">blockdiag</link>
             </member>
             <member>
                 <link linkend="augment">augment</link>
index 0cbbcc2..57b456e 100644 (file)
@@ -196,7 +196,7 @@ lft(W,[1,1],K)
                 <link linkend="feedback">feedback</link>
             </member>
             <member>
-                <link linkend="sysdiag">sysdiag</link>
+                <link linkend="blockdiag">blockdiag</link>
             </member>
         </simplelist>
     </refsection>
index b104a3e..5f2abff 100644 (file)
@@ -301,7 +301,7 @@ Q_ww=Pd.B*Q_e*Pd.B'; //input noise adds to regular input u
 Ko=lqe(Pd,Q_ww,R_vv); //observer gain
 
 //----syntax [K,X]=lqe(P21)---
-bigR =sysdiag(Q_ww, R_vv);
+bigR =blockdiag(Q_ww, R_vv);
 [W,Wt]=fullrf(bigR);
 Bw=W(1:size(Pd.B,1),:);
 Dw=W(($+1-size(Pd.C,1)):$,:);
@@ -371,7 +371,7 @@ Q_ww=Pd.B*Q_e*Pd.B'; //input noise adds to regular input u
 Ko=lqe(Pd,Q_ww,R_vv); //observer gain
 
 //----syntax [K,X]=lqe(P21)---
-bigR =sysdiag(Q_ww, R_vv);
+bigR =blockdiag(Q_ww, R_vv);
 [W,Wt]=fullrf(bigR);
 Bw=W(1:size(Pd.B,1),:);
 Dw=W(($+1-size(Pd.C,1)):$,:);
index 92be9c5..38753b5 100644 (file)
       Q_e=1; //additive input noise variance
       R_vv=0.0001*eye(2,2); //measurement noise variance
       Q_ww=Pd.B*Q_e*Pd.B'; //input noise adds to regular input u
-      Qwv=sysdiag(Q_ww,R_vv);
+      Qwv=blockdiag(Q_ww,R_vv);
       //The compensator weights
       Q_xx=diag([0.1 0 5 0]); //Weights on states
       R_uu   = 0.3; //Weight on input
-      Qxu=sysdiag(Q_xx,R_uu);
+      Qxu=blockdiag(Q_xx,R_uu);
 
       //----syntax [K,X]=lqg(P,Qxu,Qwv)---
       J=lqg(Pd,Qxu,Qwv);
                 Q_e=1; //additive input noise variance
                 R_vv=0.0001*eye(2,2); //measurement noise variance
                 Q_ww=Pd.B*Q_e*Pd.B'; //input noise adds to regular input u
-                Qwv=sysdiag(Q_ww,R_vv);
+                Qwv=blockdiag(Q_ww,R_vv);
                 //The compensator weights
                 Q_xx=diag([0.1 0 5 0]); //Weights on states
                 R_uu   = 0.3; //Weight on input
-                Qxu=sysdiag(Q_xx,R_uu);
+                Qxu=blockdiag(Q_xx,R_uu);
 
                 //----syntax [K,X]=lqg(P,Qxu,Qwv)---
                 J=lqg(Pd,Qxu,Qwv);
       Q_e=1; //additive input noise variance
       R_vv=0.0001; //measurement noise variance
       Q_ww=Pd.B*Q_e*Pd.B'; //input noise adds to regular input u
-      Qwv=sysdiag(Q_ww,R_vv);
+      Qwv=blockdiag(Q_ww,R_vv);
       //The compensator weights
       Q_xx=diag([0.1 0 1 0]); //Weights on states
       R_uu   = 0.1; //Weight on input
-      Qxu=sysdiag(Q_xx,R_uu);
+      Qxu=blockdiag(Q_xx,R_uu);
 
       //Control of the second mass position (y2)
       Qi=50;
                 Q_e=1; //additive input noise variance
                 R_vv=0.0001; //measurement noise variance
                 Q_ww=Pd.B*Q_e*Pd.B'; //input noise adds to regular input u
-                Qwv=sysdiag(Q_ww,R_vv);
+                Qwv=blockdiag(Q_ww,R_vv);
                 //The compensator weights
                 Q_xx=diag([0.1 0 1 0]); //Weights on states
                 R_uu   = 0.1; //Weight on input
-                Qxu=sysdiag(Q_xx,R_uu);
+                Qxu=blockdiag(Q_xx,R_uu);
 
                 //Control of the second mass position (y2)
                 Qi=50;
index 2058d10..dbf17a4 100644 (file)
     //LQI compensator
 
     wy=100;
-    Q= wy*sysdiag(G.C'*G.C,1);
+    Q= wy*blockdiag(G.C'*G.C,1);
     R=1/wy;
     Kc=lqi(G,Q,R);
     //full controller
index 6413430..6f4bda3 100644 (file)
                     following property:
                 </para>
                 <programlisting role=""><![CDATA[
-Sl1 = left*sysdiag(sys,eye(p,p))*right
+Sl1 = left*blockdiag(sys,eye(p,p))*right
  ]]></programlisting>
             </listitem>
             <listitem>
@@ -144,7 +144,7 @@ Sl1 = left*sysdiag(sys,eye(p,p))*right
                     <literal>left</literal> have the following property:
                 </para>
                 <programlisting role=""><![CDATA[
- Sl1 = left*sysdiag(sys*right,eye(p,p)))
+ Sl1 = left*blockdiag(sys*right,eye(p,p)))
  ]]></programlisting>
             </listitem>
         </itemizedlist>
@@ -165,17 +165,17 @@ F1=rand(m,n);
 G=rand(n,p);
 [sys1,right,left]=ss2ss(sys,rand(n,n),F1,G,2);
 
-// Sl1 equiv left*sysdiag(sys*right,eye(p,p)))
+// Sl1 equiv left*blockdiag(sys*right,eye(p,p)))
 
-res=clean(ss2tf(sys1) - ss2tf(left*sysdiag(sys*right,eye(p,p))))
+res=clean(ss2tf(sys1) - ss2tf(left*blockdiag(sys*right,eye(p,p))))
 
 // output injection then feedback (m+p,n)
 F2=rand(p,n); F=[F1;F2];
 [sys2,right,left]=ss2ss(sys,rand(n,n),F,G,1);
 
-// Sl1 equiv left*sysdiag(sys,eye(p,p))*right
+// Sl1 equiv left*blockdiag(sys,eye(p,p))*right
 
-res=clean(ss2tf(sys2)-ss2tf(left*sysdiag(sys,eye(p,p))*right))
+res=clean(ss2tf(sys2)-ss2tf(left*blockdiag(sys,eye(p,p))*right))
 
 // when F2= 0; sys1 and sys2 are the same
 F2=0*rand(p,n);F=[F1;F2];
index fd2c10f..c5f91f0 100644 (file)
  * 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="sysdiag" xml:lang="en">
+<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="sysdiag" xml:lang="en">
     <refnamediv>
         <refname>sysdiag</refname>
-        <refpurpose>Create a block diagonal matrix from provided inputs or block diagonal system connection</refpurpose>
+        <refpurpose>
+            Creates a block diagonal matrix from provided inputs. Block diagonal system connection.
+            <emphasis role="bold">(obsolete)</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>r=sysdiag(a1,a2,...,an)</synopsis>
+        <synopsis>r = sysdiag(a1,a2,...,an)</synopsis>
     </refsynopsisdiv>
     <refsection>
-        <title>Description</title>
-        <para>Returns the block-diagonal system made with subsystems put in the
-            main diagonal
-        </para>
+        <title>Arguments</title>
         <variablelist>
             <varlistentry>
                 <term>ai</term>
                 <listitem>
-                    <para>subsystems (i.e. gains, or linear systems in state-space or
-                        transfer form)
+                    <para>
+                        subsystems (i.e. gains, or linear systems in state-space or transfer form).
+                    </para>
+                    <para>
+                        constant, boolean, polynomial or rational matrices of any size.
                     </para>
-                    <para>constant, boolean, polynomial or rational matrices of any size </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>r</term>
                 <listitem>
-                    <para>a matrix with a1, a2, a3, ... on the diagonal </para>
+                    <para>
+                        a matrix with a1, a2, a3, ... on the diagonal.
+                    </para>
                 </listitem>
             </varlistentry>
         </variablelist>
     </refsection>
     <refsection>
         <title>Description</title>
+        <warning>
+            <literal>sysdiag()</literal> is obsolete. Please use <literal>blockdiag()</literal> instead.
+        </warning>
         <para>
-            Given the inputs <varname>A</varname>, <varname>B</varname> and <varname>C</varname>,
-            the output will have these matrices arranged on the diagonal:
-            <latex>\begin{bmatrix} A \ \ 0 \ \ 0 \\ 0 \ \ B \ \ 0 \\ 0 \ \ 0 \ \ C \end{bmatrix}</latex>.
+            Returns the block-diagonal system made with subsystems put in the main diagonal.
         </para>
         <para>
-            <note>
-                If all the input matrices are square, the output is known as a <emphasis>block diagonal matrix</emphasis>.
-            </note>
+            Given the inputs <varname>A</varname>, <varname>B</varname> and <varname>C</varname>,
+            the output will have these matrices arranged on the diagonal:
+            <latex style="display" alt="[A 0 0 ; 0 B 0 ; 0 0 C]">\begin{bmatrix} A \ \ 0 \ \ 0 \\ 0 \ \ B \ \ 0 \\ 0 \ \ 0 \ \ C \end{bmatrix}</latex>.
         </para>
+        <note>
+            If all the input matrices are square, the output is known as a
+            <emphasis>block diagonal matrix</emphasis>.
+        </note>
         <note>Used in particular for system interconnections.</note>
         <para>
-            Beside this function, you can also use <code>sparse()</code> primitive to build a <emphasis>block diagonal sparse matrix</emphasis>.
-        </para>
-        <para>
-            For boolean matrices <code>sysdiag()</code> always returns a zero one matrix in the corresponding block
-            ("true" values are replaced by 1 and "false" value by 0).
-        </para>
-
-        <para>
-            <code>sysdiag()</code> cannot be used to arrange matrices made of character strings,
-            but you can overload it (see: <link linkend="overloading">overloading</link>).
+            For boolean matrices <literal>sysdiag()</literal> always returns a zero one matrix in
+            the corresponding block ("true" values are replaced by 1 and "false" value by 0).
         </para>
     </refsection>
     <refsection>
-        <title>Remark</title>
-        <para>At most 17 arguments.</para>
-    </refsection>
-    <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
-s=poly(0,'s')
+s = poly(0,'s')
 sysdiag(rand(2,2),1/(s+1),[1/(s-1);1/((s-2)*(s-3))])
 sysdiag(tf2ss(1/s),1/(s+1),[1/(s-1);1/((s-2)*(s-3))])
  ]]></programlisting>
         <programlisting role="example"><![CDATA[
 // a matrix of doubles:
-A=[1 0; 0 1], B=[3 4 5; 6 7 8], C=7
-D=sysdiag(A,B,C)
+A = [1 0; 0 1], B=[3 4 5; 6 7 8], C=7
+D = sysdiag(A,B,C)
 //
 sysdiag([%t %f; %f %t], eye(2,2), ones(3,3))
 // a polynomial matrix:
-s=%s;
+s = %s;
 sysdiag([s 4*s; 4 s^4], [1 s^2 s+2; 3*s 2 s^2-1])
 // a rational matrix:
 sysdiag([1/s 2*s/(4*s+3)], [s; 4; 1/(s^2+2*s+1)])
 // a block diagonal sparse matrix:
-S=sysdiag([1 2; 3 4], [5 6; 7 8], [9 10; 11 12], [13 14; 15 16])
-S=sparse(S)
+S = sysdiag([1 2; 3 4], [5 6; 7 8], [9 10; 11 12], [13 14; 15 16])
+S = sparse(S)
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
         <title>See also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="brackets">brackets</link>
-            </member>
-            <member>
-                <link linkend="insertion">insertion</link>
-            </member>
-            <member>
-                <link linkend="feedback">feedback</link>
-            </member>
-            <member>
                 <link linkend="diag">diag</link>
             </member>
             <member>
                 <link linkend="bdiag">bdiag</link>
             </member>
             <member>
-                <link linkend="sparse">sparse</link>
+                <link linkend="repmat">repmat</link>
             </member>
             <member>
-                <link linkend="repmat">repmat</link>
+                <link linkend="brackets">brackets</link>
+            </member>
+            <member>
+                <link linkend="feedback">feedback</link>
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.0</revnumber>
+                <revdescription>
+                    sysdiag() is declared obsolete.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 8717fce..654e6cd 100644 (file)
@@ -74,8 +74,8 @@
 S1=rand(2,2);S1=S1*S1';
 S2=rand(2,2);S2=S2*S2';
 S3=rand(2,2);S3=S3*S3';
-P=sysdiag(S1,S2,zeros(4,4));
-Q=sysdiag(S1,zeros(2,2),S3,zeros(2,2));
+P=blockdiag(S1,S2,zeros(4,4));
+Q=blockdiag(S1,zeros(2,2),S3,zeros(2,2));
 X=rand(8,8);
 P=X*P*X';Q=inv(X)'*Q*inv(X);
 [T,siz]=equil1(P,Q);
index 218ad31..260740c 100644 (file)
@@ -115,7 +115,7 @@ P = [ 0 |  I]   -->'T'  (K*G*input sensitivity)
         </para>
         <para>
             重み関数は,
-            <literal> P = sysdiag(W1,W2,W3,eye(G))*P</literal>のように
+            <literal> P = blockdiag(W1,W2,W3,eye(G))*P</literal>のように
             <literal>P</literal>に適当な次元の対角システムを
             左から乗じることにより得られます.
         </para>
index 102522b..b0d4b99 100644 (file)
@@ -73,7 +73,7 @@ ss2tf(S1/.S2)
 //Same operation by LFT:
 ss2tf(lft([zeros(2,2),eye(2,2);eye(2,2),-S2],S1))
 //Other approach: with constant feedback
-BigS=sysdiag(S1,S2); F=[zeros(2,2),eye(2,2);-eye(2,2),zeros(2,2)];
+BigS=blockdiag(S1,S2); F=[zeros(2,2),eye(2,2);-eye(2,2),zeros(2,2)];
 Bigclosed=BigS/.F;
 W1=Bigclosed(1:2,1:2);   //W1=W (in state-space).
 ss2tf(W1)
@@ -88,7 +88,7 @@ ss2tf(S1*inv(eye()+S2*S1))
                 <link linkend="lft">lft</link>
             </member>
             <member>
-                <link linkend="sysdiag">sysdiag</link>
+                <link linkend="blockdiag">blockdiag</link>
             </member>
             <member>
                 <link linkend="augment">augment</link>
index 54b2f8b..71ad932 100644 (file)
@@ -145,7 +145,7 @@ lft(W,[1,1],K); ss2tf(lft(tf2ss(W),[1,1],tf2ss(K)))
                 <link linkend="feedback">feedback</link>
             </member>
             <member>
-                <link linkend="sysdiag">sysdiag</link>
+                <link linkend="blockdiag">blockdiag</link>
             </member>
         </simplelist>
     </refsection>
index fe9a441..e09ec99 100644 (file)
                     以下の特徴を有します:
                 </para>
                 <programlisting role=""><![CDATA[
-Sl1 = left*sysdiag(sys,eye(p,p))*right
+Sl1 = left*blockdiag(sys,eye(p,p))*right
  ]]></programlisting>
             </listitem>
             <listitem>
@@ -144,7 +144,7 @@ Sl1 = left*sysdiag(sys,eye(p,p))*right
                     <literal>left</literal>は以下の特徴を有します:
                 </para>
                 <programlisting role=""><![CDATA[
- Sl1 = left*sysdiag(sys*right,eye(p,p)))
+ Sl1 = left*blockdiag(sys*right,eye(p,p)))
  ]]></programlisting>
             </listitem>
         </itemizedlist>
@@ -162,13 +162,13 @@ p=1,m=2,n=2; sys=ssrand(p,m,n);
 F1=rand(m,n);
 G=rand(n,p);
 [sys1,right,left]=ss2ss(sys,rand(n,n),F1,G,2);
-// Sl1 equiv left*sysdiag(sys*right,eye(p,p)))
-res=clean(ss2tf(sys1) - ss2tf(left*sysdiag(sys*right,eye(p,p))))
+// Sl1 equiv left*blockdiag(sys*right,eye(p,p)))
+res=clean(ss2tf(sys1) - ss2tf(left*blockdiag(sys*right,eye(p,p))))
 // output injection then feedback (m+p,n)
 F2=rand(p,n); F=[F1;F2];
 [sys2,right,left]=ss2ss(sys,rand(n,n),F,G,1);
-// Sl1 equiv left*sysdiag(sys,eye(p,p))*right
-res=clean(ss2tf(sys2)-ss2tf(left*sysdiag(sys,eye(p,p))*right))
+// Sl1 equiv left*blockdiag(sys,eye(p,p))*right
+res=clean(ss2tf(sys2)-ss2tf(left*blockdiag(sys,eye(p,p))*right))
 // when F2= 0; sys1 and sys2 are the same
 F2=0*rand(p,n);F=[F1;F2];
 [sys2,right,left]=ss2ss(sys,rand(n,n),F,G,1);
index e4062d8..c58a8b9 100644 (file)
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * 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="sysdiag" xml:lang="ja">
-
+<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="sysdiag" xml:lang="ja">
     <refnamediv>
-
         <refname>sysdiag</refname>
-
-        <refpurpose>ブロック対角システム接続</refpurpose>
-
+        <refpurpose>
+            ブロック対角システム接続 <emphasis role="bold">(obsolete)</emphasis>
+        </refpurpose>
     </refnamediv>
-
     <refsynopsisdiv>
-
         <title>呼び出し手順</title>
-
-        <synopsis>r=sysdiag(a1,a2,...,an)</synopsis>
-
+        <synopsis>r = sysdiag(a1,a2,...,an)</synopsis>
     </refsynopsisdiv>
-
     <refsection>
-
-        <title>説明</title>
-
-        <para>
-
-            主対角項にサブシステムを配置したブロック対角システムを返します.
-
-        </para>
-
+        <title>設定</title>
         <variablelist>
-
             <varlistentry>
-
                 <term>ai</term>
-
                 <listitem>
-
                     <para>
-
                         サブシステム (すなわち,ゲインまたは状態空間表現または
-
                         伝達関数表現の線形システム)
-
                     </para>
-
                     <para>任意の大きさの定数, 論理値, 多項式または有理数行列</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>r</term>
-
                 <listitem>
-
                     <para>a1, a2, a3, ... を対角項に有する行列</para>
-
                 </listitem>
-
             </varlistentry>
-
         </variablelist>
-
     </refsection>
-
     <refsection>
-
         <title>説明</title>
-
+        <warning>
+            <literal>sysdiag()</literal> is obsolete. Please use <literal>blockdiag()</literal> instead.
+        </warning>
         <para>
-
-            入力<varname>A</varname>, <varname>B</varname> および
-
-            <varname>C</varname>を指定すると,
-
-            出力はこれらの行列を以下のように対角項に配置したものになります:
-
-            <latex>\begin{bmatrix} A \ \ 0 \ \ 0 \\ 0 \ \ B \ \ 0 \\ 0 \ \ 0 \ \ C \end{bmatrix}</latex>.
-
+            主対角項にサブシステムを配置したブロック対角システムを返します.
         </para>
-
         <para>
-
-            <note>
-
-                入力行列が全て正方の場合, 出力は
-
-                <emphasis>ブロック対角行列</emphasis>として
-
-                知られたものになります.
-
-            </note>
-
+            入力<varname>A</varname>, <varname>B</varname> および <varname>C</varname>を指定すると,
+            出力はこれらの行列を以下のように対角項に配置したものになります:
+            <latex style="display">\begin{bmatrix} A \ \ 0 \ \ 0 \\ 0 \ \ B \ \ 0 \\ 0 \ \ 0 \ \ C \end{bmatrix}</latex>.
         </para>
-
-
+        <note>
+            入力行列が全て正方の場合, 出力は
+            <emphasis>ブロック対角行列</emphasis>として
+            知られたものになります.
+        </note>
         <note>特にシステムの相互接続で使用されます.</note>
-
         <para>
-
-            この関数以外では,
-
-            <emphasis>ブロック対角疎行列</emphasis>.を
-
-            構築するために<code>sparse()</code>プリミティブも使用できます.
-
-        </para>
-
-        <para>
-
             論理値行列の場合,<code>sysdiag()</code> は常に
-
             対応するブロックに 0 または 1を要素とする行列
-
             ("true"値は1,"false"値は0で置換されます)を返します.
-
-        </para>
-
-
-
-        <para>
-
-            <code>sysdiag()</code> は文字列からなる
-
-            行列を配置する際に使用できませんが,
-
-            オーバーロードすることが可能です
-
-            (参照: <link linkend="overloading">オーバーローディング</link>).
-
         </para>
-
     </refsection>
-
     <refsection>
-
         <title>注意</title>
-
         <para>引数の数は最大17個に制限されています.</para>
-
     </refsection>
-
     <refsection>
-
         <title>例</title>
-
         <programlisting role="example"><![CDATA[
-s=poly(0,'s')
+s = poly(0,'s')
 sysdiag(rand(2,2),1/(s+1),[1/(s-1);1/((s-2)*(s-3))])
 sysdiag(tf2ss(1/s),1/(s+1),[1/(s-1);1/((s-2)*(s-3))])
  ]]></programlisting>
-
         <programlisting role="example"><![CDATA[
 // a matrix of doubles:
-A=[1 0; 0 1], B=[3 4 5; 6 7 8], C=7
-D=sysdiag(A,B,C)
+A = [1 0; 0 1], B=[3 4 5; 6 7 8], C=7
+D = sysdiag(A,B,C)
 //
 sysdiag([%t %f; %f %t], eye(2,2), ones(3,3))
 // a polynomial matrix:
-s=%s;
+s = %s;
 sysdiag([s 4*s; 4 s^4], [1 s^2 s+2; 3*s 2 s^2-1])
 // a rational matrix:
 sysdiag([1/s 2*s/(4*s+3)], [s; 4; 1/(s^2+2*s+1)])
 // a block diagonal sparse matrix:
-S=sysdiag([1 2; 3 4], [5 6; 7 8], [9 10; 11 12], [13 14; 15 16])
-S=sparse(S)
+S = sysdiag([1 2; 3 4], [5 6; 7 8], [9 10; 11 12], [13 14; 15 16])
+S = sparse(S)
  ]]></programlisting>
-
     </refsection>
-
     <refsection role="see also">
-
         <title>参照</title>
-
         <simplelist type="inline">
-
-            <member>
-
-                <link linkend="brackets">brackets</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="insertion">insertion</link>
-
-            </member>
-
             <member>
-
-                <link linkend="feedback">feedback</link>
-
-            </member>
-
-            <member>
-
                 <link linkend="diag">diag</link>
-
             </member>
-
             <member>
-
                 <link linkend="bdiag">bdiag</link>
-
             </member>
-
             <member>
-
-                <link linkend="sparse">sparse</link>
-
+                <link linkend="repmat">repmat</link>
             </member>
-
             <member>
-
-                <link linkend="repmat">repmat</link>
-
+                <link linkend="brackets">brackets</link>
+            </member>
+            <member>
+                <link linkend="feedback">feedback</link>
             </member>
-
         </simplelist>
-
     </refsection>
-
-</refentry>
-
+    <refsection role="history">
+        <title>履歴</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.0</revnumber>
+                <revdescription>
+                    sysdiag() is declared obsolete.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
+</refentry>
\ No newline at end of file
index 3508e84..bb0b258 100644 (file)
@@ -75,8 +75,8 @@
 S1=rand(2,2);S1=S1*S1';
 S2=rand(2,2);S2=S2*S2';
 S3=rand(2,2);S3=S3*S3';
-P=sysdiag(S1,S2,zeros(4,4));
-Q=sysdiag(S1,zeros(2,2),S3,zeros(2,2));
+P=blockdiag(S1,S2,zeros(4,4));
+Q=blockdiag(S1,zeros(2,2),S3,zeros(2,2));
 X=rand(8,8);
 P=X*P*X';Q=inv(X)'*Q*inv(X);
 [T,siz]=equil1(P,Q);
index 5571db5..22dfac9 100644 (file)
  * 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="sysdiag" xml:lang="pt">
+<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="sysdiag" xml:lang="pt">
     <refnamediv>
         <refname>sysdiag</refname>
-        <refpurpose>conexão de sistemas diagonais em blocos</refpurpose>
+        <refpurpose>
+            conexão de sistemas diagonais em blocos <emphasis role="bold">(obsolete)</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Seqüência de Chamamento</title>
-        <synopsis>r=sysdiag(a1,a2,...,an)</synopsis>
+        <synopsis>r = sysdiag(a1,a2,...,an)</synopsis>
     </refsynopsisdiv>
     <refsection>
-        <title>Descrição</title>
-        <para>Retorna um sistema diagonal em blocos feito de subsistemas postos na
-            diagonal principal.
-        </para>
+        <title>Parâmetros</title>
         <variablelist>
             <varlistentry>
                 <term>ai</term>
                 <listitem>
+                    <para>
+                        constant, boolean, polynomial or rational matrices of any size.
+                    </para>
                     <para>subsistemas (i.e. ganhos, ou sistema linear em forma de espaço
                         de estados ou de transferência)
                     </para>
                 </listitem>
             </varlistentry>
+            <varlistentry>
+                <term>r</term>
+                <listitem>
+                    <para>a matrix with a1, a2, a3, ... on the diagonal</para>
+                </listitem>
+            </varlistentry>
         </variablelist>
-        <para>Usado em particular para interconexões de sistemas.</para>
     </refsection>
     <refsection>
-        <title>Observação</title>
-        <para>No máximo 17 argumentos.</para>
+        <title>Descrição</title>
+        <warning>
+            <literal>sysdiag()</literal> is obsolete. Please use <literal>blockdiag()</literal> instead.
+        </warning>
+        <para>Retorna um sistema diagonal em blocos feito de subsistemas postos na
+            diagonal principal.
+        </para>
+        <para>
+            Given the inputs <varname>A</varname>, <varname>B</varname> and <varname>C</varname>,
+            the output will have these matrices arranged on the diagonal:
+            <latex style="display" alt="[A 0 0 ; 0 B 0 ; 0 0 C]">\begin{bmatrix} A \ \ 0 \ \ 0 \\ 0 \ \ B \ \ 0 \\ 0 \ \ 0 \ \ C \end{bmatrix}</latex>.
+        </para>
+        <note>
+            If all the input matrices are square, the output is known as a <emphasis>block diagonal matrix</emphasis>.
+        </note>
+        <note>Usado em particular para interconexões de sistemas.</note>
+        <para>
+            For boolean matrices <literal>sysdiag()</literal> always returns a zero one matrix in
+            the corresponding block ("true" values are replaced by 1 and "false" value by 0).
+        </para>
     </refsection>
     <refsection>
         <title>Exemplos</title>
         <programlisting role="example"><![CDATA[
-s=poly(0,'s')
+s = poly(0,'s')
 sysdiag(rand(2,2),1/(s+1),[1/(s-1);1/((s-2)*(s-3))])
 sysdiag(tf2ss(1/s),1/(s+1),[1/(s-1);1/((s-2)*(s-3))])
  ]]></programlisting>
+        <programlisting role="example"><![CDATA[
+// a matrix of doubles:
+A = [1 0; 0 1], B=[3 4 5; 6 7 8], C=7
+D = sysdiag(A,B,C)
+//
+sysdiag([%t %f; %f %t], eye(2,2), ones(3,3))
+// a polynomial matrix:
+s = %s;
+sysdiag([s 4*s; 4 s^4], [1 s^2 s+2; 3*s 2 s^2-1])
+// a rational matrix:
+sysdiag([1/s 2*s/(4*s+3)], [s; 4; 1/(s^2+2*s+1)])
+// a block diagonal sparse matrix:
+S = sysdiag([1 2; 3 4], [5 6; 7 8], [9 10; 11 12], [13 14; 15 16])
+S = sparse(S)
+ ]]></programlisting>
     </refsection>
     <refsection role="see also">
         <title>Ver Também</title>
         <simplelist type="inline">
             <member>
-                <link linkend="brackets">brackets</link>
+                <link linkend="diag">diag</link>
             </member>
             <member>
-                <link linkend="insertion">insertion</link>
+                <link linkend="bdiag">bdiag</link>
+            </member>
+            <member>
+                <link linkend="repmat">repmat</link>
+            </member>
+            <member>
+                <link linkend="brackets">brackets</link>
             </member>
             <member>
                 <link linkend="feedback">feedback</link>
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>Histórico</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.0</revnumber>
+                <revdescription>
+                    sysdiag() is declared obsolete.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index ca4d1e5..5605222 100644 (file)
  * 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="sysdiag" xml:lang="ru">
+<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="sysdiag" xml:lang="ru">
     <refnamediv>
         <refname>sysdiag</refname>
-        <refpurpose>соединение блочно-диагональной системы</refpurpose>
+        <refpurpose>
+            соединение блочно-диагональной системы <emphasis role="bold">(obsolete)</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Синтаксис</title>
-        <synopsis>r=sysdiag(a1,a2,...,an)</synopsis>
+        <synopsis>r = sysdiag(a1,a2,...,an)</synopsis>
     </refsynopsisdiv>
     <refsection>
-        <title>Описание</title>
-        <para>
-            Возвращает блочно-диагональную систему, созданную из подсистем, расположенных по главной диагонали.
-        </para>
+        <title>Аргументы</title>
         <variablelist>
             <varlistentry>
                 <term>ai</term>
                 <listitem>
                     <para>
-                        подсистемы (т. е. усилители или линейные системы в пространстве состояний или в передаточной форме)
+                        constant, boolean, polynomial or rational matrices of any size.
                     </para>
+                    <para>
+                        подсистемы (т. е. усилители или линейные системы в пространстве состояний
+                        или в передаточной форме)
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>r</term>
+                <listitem>
+                    <para>a matrix with a1, a2, a3, ... on the diagonal.</para>
                 </listitem>
             </varlistentry>
         </variablelist>
-        <para>Особенно используется в системных взаимосвязях.</para>
     </refsection>
     <refsection>
-        <title>Примечание</title>
-        <para>Не больше 17 аргументов.</para>
+        <title>Описание</title>
+        <warning>
+            <literal>sysdiag()</literal> is obsolete. Please use <literal>blockdiag()</literal> instead.
+        </warning>
+        <para>
+            Возвращает блочно-диагональную систему, созданную из подсистем, расположенных по главной диагонали.
+        </para>
+        <para>
+            Given the inputs <varname>A</varname>, <varname>B</varname> and <varname>C</varname>,
+            the output will have these matrices arranged on the diagonal:
+            <latex style="display" alt="[A 0 0 ; 0 B 0 ; 0 0 C]">\begin{bmatrix} A \ \ 0 \ \ 0 \\ 0 \ \ B \ \ 0 \\ 0 \ \ 0 \ \ C \end{bmatrix}</latex>.
+        </para>
+        <note>
+            If all the input matrices are square, the output is known as a <emphasis>block diagonal matrix</emphasis>.
+        </note>
+        <note>Особенно используется в системных взаимосвязях.</note>
+        <para>
+            For boolean matrices <literal>sysdiag()</literal> always returns a zero one matrix in
+            the corresponding block ("true" values are replaced by 1 and "false" value by 0).
+        </para>
     </refsection>
     <refsection>
         <title>Примеры</title>
         <programlisting role="example"><![CDATA[
-s=poly(0,'s')
+s = poly(0,'s')
 sysdiag(rand(2,2),1/(s+1),[1/(s-1);1/((s-2)*(s-3))])
 sysdiag(tf2ss(1/s),1/(s+1),[1/(s-1);1/((s-2)*(s-3))])
  ]]></programlisting>
+        <programlisting role="example"><![CDATA[
+// a matrix of doubles:
+A = [1 0; 0 1], B=[3 4 5; 6 7 8], C=7
+D = sysdiag(A,B,C)
+//
+sysdiag([%t %f; %f %t], eye(2,2), ones(3,3))
+// a polynomial matrix:
+s = %s;
+sysdiag([s 4*s; 4 s^4], [1 s^2 s+2; 3*s 2 s^2-1])
+// a rational matrix:
+sysdiag([1/s 2*s/(4*s+3)], [s; 4; 1/(s^2+2*s+1)])
+// a block diagonal sparse matrix:
+S = sysdiag([1 2; 3 4], [5 6; 7 8], [9 10; 11 12], [13 14; 15 16])
+S = sparse(S)
+ ]]></programlisting>
     </refsection>
     <refsection role="see also">
         <title>Смотрите также</title>
         <simplelist type="inline">
             <member>
-                <link linkend="brackets">brackets</link>
+                <link linkend="diag">diag</link>
             </member>
             <member>
-                <link linkend="insertion">insertion</link>
+                <link linkend="bdiag">bdiag</link>
+            </member>
+            <member>
+                <link linkend="repmat">repmat</link>
+            </member>
+            <member>
+                <link linkend="brackets">brackets</link>
             </member>
             <member>
                 <link linkend="feedback">feedback</link>
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>История</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.0</revnumber>
+                <revdescription>
+                    sysdiag() is declared obsolete.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 1fcacf0..a574356 100644 (file)
@@ -185,7 +185,7 @@ function [X,dims,F,U,k,Z]=abinv(Sl,Alfa,Beta,flag)
     F1t=stabil(A11,B11,Alfa);
 
     F=[U*[F1t;F1bar],F2]*X';
-    X=X*sysdiag(eye(Ur),U2);
+    X=X*blockdiag(eye(Ur),U2);
     select flag
     case "ge"
         dims=[dimR,dimVg,dimV,dimV+nc2,dimV+ns2];
index 57e5925..9bddd0e 100644 (file)
@@ -98,7 +98,7 @@ function K=lqg(P,varargin)
             if norm(Qi.'-Qi,1)>100*%eps*norm(Qi,1) then
                 error(msprintf(_("%s: Wrong value for input argument #%d: Must be symmetric.\n"),"lqg",4))
             end
-            Kc=lqi(P,sysdiag(Qxu(1:nx,1:nx),Qi),Qxu(nx+1:$,nx+1:$),...
+            Kc=lqi(P,blockdiag(Qxu(1:nx,1:nx),Qi),Qxu(nx+1:$,nx+1:$),...
             [Qxu(1:nx,nx+1:nx+nu);zeros(ny,nu)]);
             // Form the controller
             //O=observer(P,Kf)
index 7854d50..61bfa50 100644 (file)
@@ -41,7 +41,7 @@ function [Obs,U,m]=observer(Sys,flag,alfa)
     // [Obs,U,m]=observer(Sys);  Stable observer (default)
     // W=U';H=W(m+1:nx,:);[A,B,C,D]=abcd(Sys);  //H*U=[0,eye(no,no)];
     // Sys2=ss2tf(syslin('c',A,B,H))  //Transfer u-->z
-    // Idu=eye(nu,nu);ss2tf(Obs*sysdiag(Idu,Sys)*[Idu;Idu])
+    // Idu=eye(nu,nu);ss2tf(Obs*blockdiag(Idu,Sys)*[Idu;Idu])
     // Transfer u-->[u;u]-->w=[u;y=Sys*u]-->Obs*w  i.e. u-->output of Obs
     // this transfer must equal Sys2, the u-->z transfer  (H2=eye).
 
index b2ec5ca..9c1e960 100644 (file)
@@ -62,7 +62,7 @@ function [Sl1,right,left]=ss2ss(Sl,T,F,G,flag)
             //         [ C+D*F1               , (D   , 0)]
             //
             // We have then the following property
-            // Sl1 equiv  left*sysdiag(sys,eye(p,p))*right
+            // Sl1 equiv  left*blockdiag(sys,eye(p,p))*right
             //
             //
             n=size(A,"r");p=size(C,"r");
@@ -86,7 +86,7 @@ function [Sl1,right,left]=ss2ss(Sl,T,F,G,flag)
             //         [ C+D*F         , (D   , 0)]
             // this is a generalization of the case 4
             // We have then the following property
-            // Sl1 equiv left*sysdiag(sys*right,eye(p,p)))
+            // Sl1 equiv left*blockdiag(sys*right,eye(p,p)))
             //
             p = size(C,"r");
             A1=A+B*F+G*C+G*D*F;
index 781f00c..14d2771 100644 (file)
@@ -161,7 +161,7 @@ function [sl,U]=ssrand(nout,nin,nstate,flag)
         sl=ss2ss(syslin("c",a,b,c),U);
     case "ncno"
         cno=flag(2);ncno=flag(3);co=flag(4);nco=flag(5);
-        a=sysdiag(rand(cno,cno),rand(ncno,ncno),rand(co,co),rand(nco,nco));
+        a=blockdiag(rand(cno,cno),rand(ncno,ncno),rand(co,co),rand(nco,nco));
         b=[rand(cno,nin);
         zeros(ncno,nin);
         rand(co,nin);
@@ -171,7 +171,7 @@ function [sl,U]=ssrand(nout,nin,nstate,flag)
         sl=ss2ss(syslin("c",a,b,c),U);
     case "st"
         [nc,ns,ns0]=flag(2:4);nsc=ns-nc;nsc0=ns0-ns;nxs=nstate-ns;
-        a=sysdiag(rand(nc,nc),imag_axis(ns-nc,ns0-ns,nstate-ns0)),
+        a=blockdiag(rand(nc,nc),imag_axis(ns-nc,ns0-ns,nstate-ns0)),
         b=[rand(nc,nin);zeros(nstate-nc,nin)];
         c=rand(nout,nstate);
         U=rand(nstate,nstate);
@@ -179,14 +179,14 @@ function [sl,U]=ssrand(nout,nin,nstate,flag)
     case "dt"
         [n1,n2,n3]=flag(2:4);
         w=imag_axis(n3-n2,n2-n1,n1,"uis");
-        a=sysdiag(w,rand(nstate-n3,nstate-n3));
+        a=blockdiag(w,rand(nstate-n3,nstate-n3));
         c=[zeros(nout,n3),rand(nout,nstate-n3)];b=rand(nstate,nin);
         U=rand(nstate,nstate);
         sl=ss2ss(syslin("c",a,b,c),U);
     case "on"
         [nr,ng,ng0,nv,rk]=flag(2:6);
         p1=1;p2=1;
-        a11=sysdiag(rand(nr,nr),imag_axis(ng-nr,ng0-ng,nv-ng0));
+        a11=blockdiag(rand(nr,nr),imag_axis(ng-nr,ng0-ng,nv-ng0));
         a12=rand(nv,nstate-nv);
         a21=rand(nstate-nv,nv);a22=rand(nstate-nv,nstate-nv);
         b11=zeros(nv,rk);b12=[rand(nr,nin-rk);zeros(nv-nr,nin-rk)];
@@ -224,7 +224,7 @@ function [sl,U]=ssrand(nout,nin,nstate,flag)
     case "ui"
         [nw,nwu,nwui,nwuis,rk]=flag(2:6)
         a11=rand(nw,nw);
-        a22=sysdiag(imag_axis(nwu-nw,nwui-nwu,nwuis-nwui,"uis"),...
+        a22=blockdiag(imag_axis(nwu-nw,nwui-nwu,nwuis-nwui,"uis"),...
         rand(nstate-nwuis,nstate-nwuis))
         a12=rand(nw,nstate-nw);
         b1=rand(nw,nin);
@@ -262,12 +262,12 @@ function w=imag_axis(ns,nn,nu,flag);
         w=[];k=int(nn/2);
         rand("normal");
         //rand('seed',0);
-        w=sysdiag(w,st_able(rand(ns,ns),margin));
+        w=blockdiag(w,st_able(rand(ns,ns),margin));
         x=rand(1,k);
         for u=x
-        w=sysdiag(w,[u,-2*u;u,-u]);end
-        if abs(2*k-nn)>1.d-5 then w=sysdiag(w,0);end
-        w=sysdiag(w,-st_able(rand(nu,nu),margin));
+        w=blockdiag(w,[u,-2*u;u,-u]);end
+        if abs(2*k-nn)>1.d-5 then w=blockdiag(w,0);end
+        w=blockdiag(w,-st_able(rand(nu,nu),margin));
         rand("uniform");
         //rand('seed',0);
         return
@@ -283,12 +283,12 @@ function w=imag_axis(ns,nn,nu,flag);
         w=[];k=int(nn/2);
         rand("normal");
         //rand('seed',0);
-        w=sysdiag(w,-st_able(rand(nu,nu),margin));
+        w=blockdiag(w,-st_able(rand(nu,nu),margin));
         x=rand(1,k);
         for u=x
-        w=sysdiag(w,[u,-2*u;u,-u]);end
-        if abs(2*k-nn)>1.d-5 then w=sysdiag(w,0);end
-        w=sysdiag(w,st_able(rand(ns,ns),margin));
+        w=blockdiag(w,[u,-2*u;u,-u]);end
+        if abs(2*k-nn)>1.d-5 then w=blockdiag(w,0);end
+        w=blockdiag(w,st_able(rand(ns,ns),margin));
         rand("uniform");
         //rand('seed',0);
     end
index adf2991..85b5368 100644 (file)
@@ -27,6 +27,8 @@ function r=sysdiag(varargin)
 
 
     //!
+    warnobsolete("blockdiag()","6.1.x")
+
     r=varargin(1);
     [m1,n1]=size(r);
     for k = 2:size(varargin)
diff --git a/scilab/modules/cacsd/tests/nonreg_tests/bug_13750.dia.ref b/scilab/modules/cacsd/tests/nonreg_tests/bug_13750.dia.ref
deleted file mode 100644 (file)
index e215dc8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2015 - Scilab Enterprises - Adeline CARNIS
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- CLI SHELL MODE -->
-// <-- Non-regression test for bug 13750 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=13750
-//
-// <-- Short Description -->
-//    Calling ss2ss with flag = 2 returned an error. The variable p was missing.
-// =============================================================================
-in=1;m=2;n=2;
-sys=ssrand(in,m,n);
-F1=rand(m,n);
-G=rand(n,in);
-[sys1,right,left]=ss2ss(sys,rand(n,n),F1,G,2);
-res=clean(ss2tf(sys1) - ss2tf(left*sysdiag(sys*right,eye(1,1))));
-assert_checkalmostequal(coeff(res.num), zeros(size(res,"r"), size(res, "c")), [], %eps);
index 3523325..b947f2b 100644 (file)
@@ -6,7 +6,8 @@
 // =============================================================================
 
 // <-- CLI SHELL MODE -->
-
+// <-- NO CHECK REF -->
+//
 // <-- Non-regression test for bug 13750 -->
 //
 // <-- Bugzilla URL -->
@@ -22,5 +23,5 @@ sys=ssrand(in,m,n);
 F1=rand(m,n);
 G=rand(n,in);
 [sys1,right,left]=ss2ss(sys,rand(n,n),F1,G,2);
-res=clean(ss2tf(sys1) - ss2tf(left*sysdiag(sys*right,eye(1,1))));
+res=clean(ss2tf(sys1) - ss2tf(left*blockdiag(sys*right,eye(1,1))));
 assert_checkalmostequal(coeff(res.num), zeros(size(res,"r"), size(res, "c")), [], %eps);
diff --git a/scilab/modules/cacsd/tests/nonreg_tests/bug_4731.dia.ref b/scilab/modules/cacsd/tests/nonreg_tests/bug_4731.dia.ref
deleted file mode 100644 (file)
index fbd6809..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-//<-- CLI SHELL MODE -->
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-//
-// <-- Non-regression test for bug 4731 -->
-//
-// <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=4731
-//
-// <-- Short Description -->
-// lqr fails if dt argument of syslin is a number
-A=[0.5 0.3;0.3 0.9];B=[0.9; 0.3];
-Q=diag([2,5]);R=2;
-Big=sysdiag(Q,R);
-[w,wp]=fullrf(Big);C1=wp(:,1:2);D12=wp(:,3:$);
-P=syslin(1,A,B,C1,D12);
-[K,X]=lqr(P);
-S=spec(A+B*K);
-R=norm(A'*X*A-(A'*X*B)*pinv(B'*X*B+R)*(B'*X*A)+Q-X,1);
-assert_checkalmostequal(real(S),[0.24977769272823835; 0.47346570058644721]);
-assert_checkequal(imag(S),[0;0]);
-assert_checktrue(R<100*%eps);
index e97d26d..53a937d 100644 (file)
@@ -1,4 +1,3 @@
-//<-- CLI SHELL MODE -->
 // =============================================================================
 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 // Copyright (C) 2013 - Scilab Enterprises - Charlotte HECQUET
@@ -6,6 +5,9 @@
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
 //
+// <-- CLI SHELL MODE -->
+// <-- NO CHECK REF -->
+//
 // <-- Non-regression test for bug 4731 -->
 //
 // <-- Bugzilla URL -->
@@ -16,7 +18,7 @@
 
 A=[0.5 0.3;0.3 0.9];B=[0.9; 0.3];
 Q=diag([2,5]);R=2;
-Big=sysdiag(Q,R);
+Big=blockdiag(Q,R);
 [w,wp]=fullrf(Big);C1=wp(:,1:2);D12=wp(:,3:$);
 P=syslin(1,A,B,C1,D12);
 [K,X]=lqr(P);
diff --git a/scilab/modules/cacsd/tests/unit_tests/lqg.dia.ref b/scilab/modules/cacsd/tests/unit_tests/lqg.dia.ref
deleted file mode 100644 (file)
index 4d1d657..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-//<-- CLI SHELL MODE -->
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2016 - INRIA - Serge Steer
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-A=[0 1 0;0 0 1;1 0 0];
-B=[0.3 1;0 1;-0.3 0.9];
-C=[1.9 1.3 1];
-D=[0.53 -0.61];
-Q_ww=[4 2 0;2 1 0;0 0 1];
-R_vv=0.7;
-Q_wv=sysdiag(Q_ww,R_vv);
-Q_xu=sysdiag(0.1*eye(3,3),[1 0;0 2]);
-Qi=1;
-// continuous time----------------------------------------
-sys=syslin("c",A,B,C,D);
-KLQG = lqg(sys,Q_xu,Q_wv);
-H=sys/.(-KLQG);
-assert_checktrue(and(real(spec(H.A))<0));
-[aug,r]=lqg2stan(sys,Q_xu,Q_wv);
-KLQG_a = lqg(aug,r);
-assert_checktrue(norm(KLQG.A-KLQG_a.A,1)<1e10&norm(KLQG.B-KLQG_a.B,1)<1e10&norm(KLQG.C-KLQG_a.C,1)<1e10);
-KLQG1 = lqg(sys,Q_xu,Q_wv,Qi,1);
-H1=sys/.(KLQG1);
-assert_checktrue(and(real(spec(H1.A))<0));
-KLQG2 = lqg(sys,Q_xu,Q_wv,Qi,2);
-H2=lft([1;1]*sys*KLQG2,1);
-assert_checktrue(and(real(spec(H2.A))<0));
-// dicrete time----------------------------------------
-sysd=dscr(sys,0.01);
-KLQG = lqg(sysd,Q_xu,Q_wv);
-H=sys/.(-KLQG);
-assert_checktrue(and(abs(spec(H.A))<1));
-[aug,r]=lqg2stan(sysd,Q_xu,Q_wv);
-KLQG_a = lqg(aug,r);
-assert_checktrue(norm(KLQG.A-KLQG_a.A,1)<1e10&norm(KLQG.B-KLQG_a.B,1)<1e10&norm(KLQG.C-KLQG_a.C,1)<1e10);
-KLQG1 = lqg(sysd,Q_xu,Q_wv,Qi,1);
-H1=sysd/.(KLQG1);
-assert_checktrue(and(abs(spec(H1.A))<1));
-KLQG2 = lqg(sysd,Q_xu,Q_wv,Qi,2);
-H2=lft([1;1]*sysd*KLQG2,1);
-assert_checktrue(and(abs(spec(H2.A))<1));
index 54c950d..14acb2b 100644 (file)
@@ -1,18 +1,20 @@
-//<-- CLI SHELL MODE -->
 // =============================================================================
 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 // Copyright (C) 2016 - INRIA - Serge Steer
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+// <-- CLI SHELL MODE -->
+// <-- NO CHECK REF -->
+//
 A=[0 1 0;0 0 1;1 0 0];
 B=[0.3 1;0 1;-0.3 0.9];
 C=[1.9 1.3 1];
 D=[0.53 -0.61];
 Q_ww=[4 2 0;2 1 0;0 0 1];
 R_vv=0.7;
-Q_wv=sysdiag(Q_ww,R_vv);
-Q_xu=sysdiag(0.1*eye(3,3),[1 0;0 2]);
+Q_wv=blockdiag(Q_ww,R_vv);
+Q_xu=blockdiag(0.1*eye(3,3),[1 0;0 2]);
 
 Qi=1;
 // continuous time----------------------------------------
diff --git a/scilab/modules/cacsd/tests/unit_tests/lqi.dia.ref b/scilab/modules/cacsd/tests/unit_tests/lqi.dia.ref
deleted file mode 100644 (file)
index 763301a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//<-- CLI SHELL MODE -->
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2016 - INRIA - Serge Steer
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-A=[0 1 0;0 0 1;1 0 0];
-B=[0.3 1;0 1;-0.3 0.9];
-C=[1.9 1.3 1;0 1 1];
-D=[0.53 -0.61;0 0];
-Q_xx=0.1*eye(3,3);
-R_uu=[1 0;0 2];
-Q_i=eye(2,2);
-Q_xu=sysdiag(0.1*eye(3,3),[1 0;0 2]);
-Q_zz=sysdiag(Q_xx,Q_i);
-// continuous time----------------------------------------
-P=syslin("c",A,B,C,D);
-[ny,nu,nx]=size(P);
-Kc=lqi(P,Q_zz,R_uu);
-//add states to the output to compute the regulated system
-Px=syslin("c",A,B,[eye(3,3);C],[zeros(3,2);D]);
-I=tf2ss(syslin("c",1/%s));
-Pa=[zeros(ny,nx) eye(ny,ny)
-    eye(nx,nx)   zeros(nx,ny)
-    zeros(ny,nx) eye(ny,ny)]*Px*[-Kc(:,nx+1:nx+ny)*I -Kc(:,1:nx) Kc(:,nx+1:nx+ny)*I];
-H=lft(Pa,eye(5,5));
-p=spec(H.A);
-assert_checktrue(and(real(p)<10*%eps));
-assert_checktrue(size(find(abs(p)<10*%eps),"*")==2);
index d045195..000ba38 100644 (file)
@@ -1,10 +1,12 @@
-//<-- CLI SHELL MODE -->
 // =============================================================================
 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 // Copyright (C) 2016 - INRIA - Serge Steer
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+// <-- CLI SHELL MODE -->
+// <-- NO CHECK REF -->
+//
 A=[0 1 0;0 0 1;1 0 0];
 B=[0.3 1;0 1;-0.3 0.9];
 C=[1.9 1.3 1;0 1 1];
@@ -13,8 +15,8 @@ D=[0.53 -0.61;0 0];
 Q_xx=0.1*eye(3,3);
 R_uu=[1 0;0 2];
 Q_i=eye(2,2);
-Q_xu=sysdiag(0.1*eye(3,3),[1 0;0 2]);
-Q_zz=sysdiag(Q_xx,Q_i);
+Q_xu=blockdiag(0.1*eye(3,3),[1 0;0 2]);
+Q_zz=blockdiag(Q_xx,Q_i);
 
 // continuous time----------------------------------------
 P=syslin("c",A,B,C,D);
diff --git a/scilab/modules/cacsd/tests/unit_tests/lqr.dia.ref b/scilab/modules/cacsd/tests/unit_tests/lqr.dia.ref
deleted file mode 100644 (file)
index 9fa4594..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-//<-- CLI SHELL MODE -->
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2016 - INRIA - Serge Steer
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-Q=diag([2,5]);R=2;S=[1 1];
-//full state LQ controller Continuous time plant
-//----------------------------------------------
-//S=0
-dcmotor=syslin("c",[-10,1;-0.02,-2],[0;2],[]);
-//long syntax
-[K1,X1]=lqr(dcmotor,Q,R);
-//check stability
-assert_checktrue(real(spec(dcmotor.A+dcmotor.B*K1))<0);
-//Check Riccati equation
-assert_checktrue(norm(dcmotor.A'*X1+X1*dcmotor.A-X1*(dcmotor.B/R)*dcmotor.B'*X1+Q,1)<1e-10);
-//Augmented plant syntax
-[w,wp]=fullrf(sysdiag(Q,R));  //[C1,D12]'*[C1,D12]=Big
-dcmotor.C=wp(:,1:2);
-dcmotor.D=wp(:,3:$);
-[K2,X2]=lqr(dcmotor);
-assert_checktrue(norm(X2-X1,1)<1e-12);
-assert_checktrue(norm(K2-K1,1)<1e-12);
-//Non zero S term
-dcmotor=syslin("c",[-10,1;-0.02,-2],[0;2],[]);
-//long syntax
-[K1,X1]=lqr(dcmotor,Q,R,S);
-//check stability
-assert_checktrue(real(spec(dcmotor.A+dcmotor.B*K1))<0);
-//Check Riccati equation
-Ric=(dcmotor.A-dcmotor.B/R*S)'*X1+X1*(dcmotor.A-dcmotor.B/R*S)-X1*(dcmotor.B/R)*dcmotor.B'*X1+Q-S'/R*S;
-assert_checktrue(norm(Ric,1)<1e-10);
-//Augmented plant syntax
-[w,wp]=fullrf([Q S';S R]);  //[C1,D12]'*[C1,D12]=Big
-dcmotor.C=wp(:,1:2);
-dcmotor.D=wp(:,3:$);
-[K2,X2]=lqr(dcmotor);
-assert_checktrue(norm(X2-X1,1)<1e-12);
-assert_checktrue(norm(K2-K1,1)<1e-12);
-//full state LQ controller discrete time plant
-//----------------------------------------------
-dcmotor=dscr(syslin("c",[-10,1;-0.02,-2],[0;2],[]),0.01); 
-//long syntax
-[K1,X1]=lqr(dcmotor,Q,R);
-//check stability
-assert_checktrue(abs(spec(dcmotor.A+dcmotor.B*K1))<1);
-//Check Riccati equation
-Ric=dcmotor.A'*X1*dcmotor.A-(dcmotor.A'*X1*dcmotor.B)*pinv(dcmotor.B'*X1*dcmotor.B+R)*(dcmotor.B'*X1*dcmotor.A)+Q-X1;
-assert_checktrue(norm(Ric,1)<1e-10);
-//Augmented plant syntax
-[w,wp]=fullrf(sysdiag(Q,R));  //[C1,D12]'*[C1,D12]=Big
-dcmotor.C=wp(:,1:2);
-dcmotor.D=wp(:,3:$);
-[K2,X2]=lqr(dcmotor);
-assert_checktrue(norm(X2-X1,1)<1e-10);
-assert_checktrue(norm(K2-K1,1)<1e-10);
-//non zero S term
-dcmotor=dscr(syslin("c",[-10,1;-0.02,-2],[0;2],[]),0.01); 
-//long syntax
-[K1,X1]=lqr(dcmotor,Q,R,S);
-//check stability
-assert_checktrue(abs(spec(dcmotor.A+dcmotor.B*K1))<1);
-//Check Riccati equation
-Ric=dcmotor.A'*X1*dcmotor.A-(dcmotor.A'*X1*dcmotor.B+S')*pinv(dcmotor.B'*X1*dcmotor.B+R)*(dcmotor.B'*X1*dcmotor.A+S)+Q-X1;
-assert_checktrue(norm(Ric,1)<1e-10);
-//Augmented plant syntax
-[w,wp]=fullrf([Q S';S R]);  //[C1,D12]'*[C1,D12]=Big
-dcmotor.C=wp(:,1:2);
-dcmotor.D=wp(:,3:$);
-[K2,X2]=lqr(dcmotor);
-assert_checktrue(norm(X2-X1,1)<1e-10);
-assert_checktrue(norm(K2-K1,1)<1e-10);
index b7a48e8..5ed4d7d 100644 (file)
@@ -1,10 +1,12 @@
-//<-- CLI SHELL MODE -->
 // =============================================================================
 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 // Copyright (C) 2016 - INRIA - Serge Steer
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+// <-- CLI SHELL MODE -->
+// <-- NO CHECK REF -->
+//
 Q=diag([2,5]);R=2;S=[1 1];
 //full state LQ controller Continuous time plant
 //----------------------------------------------
@@ -19,7 +21,7 @@ assert_checktrue(real(spec(dcmotor.A+dcmotor.B*K1))<0);
 assert_checktrue(norm(dcmotor.A'*X1+X1*dcmotor.A-X1*(dcmotor.B/R)*dcmotor.B'*X1+Q,1)<1e-10);
 
 //Augmented plant syntax
-[w,wp]=fullrf(sysdiag(Q,R));  //[C1,D12]'*[C1,D12]=Big
+[w,wp]=fullrf(blockdiag(Q,R));  //[C1,D12]'*[C1,D12]=Big
 dcmotor.C=wp(:,1:2);
 dcmotor.D=wp(:,3:$);
 [K2,X2]=lqr(dcmotor);
@@ -59,7 +61,7 @@ Ric=dcmotor.A'*X1*dcmotor.A-(dcmotor.A'*X1*dcmotor.B)*pinv(dcmotor.B'*X1*dcmotor
 assert_checktrue(norm(Ric,1)<1e-10);
 
 //Augmented plant syntax
-[w,wp]=fullrf(sysdiag(Q,R));  //[C1,D12]'*[C1,D12]=Big
+[w,wp]=fullrf(blockdiag(Q,R));  //[C1,D12]'*[C1,D12]=Big
 dcmotor.C=wp(:,1:2);
 dcmotor.D=wp(:,3:$);
 [K2,X2]=lqr(dcmotor);
index d92c987..3424a7a 100644 (file)
@@ -76,7 +76,7 @@
             If <literal>vm</literal> is a sparse matrix
             <literal>diag(vm,k)</literal> returns a sparse matrix.
         </para>
-        <para>To construct a diagonal linear system, use <literal>sysdiag</literal>.
+        <para>To construct a diagonal linear system, use <literal>blockdiag</literal>.
         </para>
         <para>
             Note that <literal>eye(A).*A</literal> returns a diagonal matrix
@@ -110,7 +110,7 @@ m=5;diag(-m:m) +  diag(ones(2*m,1),1) +diag(ones(2*m,1),-1)
                 <link linkend="eye">eye</link>
             </member>
             <member>
-                <link linkend="sysdiag">sysdiag</link>
+                <link linkend="blockdiag">blockdiag</link>
             </member>
             <member>
                 <link linkend="spec">spec</link>
index e330e79..febae3c 100644 (file)
@@ -80,7 +80,7 @@
             <literal>diag(vm,k)</literal> renvoie une matrice creuse.
         </para>
         <para>Pour construire un système linéaire diagonal, utilisez
-            <literal>sysdiag</literal>.
+            <literal>blockdiag</literal>.
         </para>
         <para>
             Notez que <literal>eye(A).*A</literal> renvoie une matrice diagonale
@@ -114,7 +114,7 @@ m=5;diag(-m:m) +  diag(ones(2*m,1),1) +diag(ones(2*m,1),-1)
                 <link linkend="eye">eye</link>
             </member>
             <member>
-                <link linkend="sysdiag">sysdiag</link>
+                <link linkend="blockdiag">blockdiag</link>
             </member>
             <member>
                 <link linkend="spec">spec</link>
index c05e0c7..3d44617 100644 (file)
@@ -78,7 +78,7 @@
             <literal>diag(vm,k)</literal> は疎行列を返します.
         </para>
         <para>対角線形システムを構築するには,
-            <literal>sysdiag</literal>を使用してください.
+            <literal>blockdiag</literal>を使用してください.
         </para>
         <para>
             <literal>eye(A).*A</literal> は
@@ -113,7 +113,7 @@ m=5;diag(-m:m) +  diag(ones(2*m,1),1) +diag(ones(2*m,1),-1)
                 <link linkend="eye">eye</link>
             </member>
             <member>
-                <link linkend="sysdiag">sysdiag</link>
+                <link linkend="blockdiag">blockdiag</link>
             </member>
             <member>
                 <link linkend="spec">spec</link>
index 4169ac5..14237c0 100644 (file)
@@ -77,7 +77,7 @@
             <literal>diag(vm,k)</literal> retorna uma matriz esparsa.
         </para>
         <para>Para construir um sistema linear diagonal, use
-            <literal>sysdiag</literal>.
+            <literal>blockdiag</literal>.
         </para>
         <para>
             Perceba que <literal>eye(A).*A</literal> retorna uma matriz diagonal
@@ -111,7 +111,7 @@ m=5;diag(-m:m) +  diag(ones(2*m,1),1) +diag(ones(2*m,1),-1)
                 <link linkend="eye">eye</link>
             </member>
             <member>
-                <link linkend="sysdiag">sysdiag</link>
+                <link linkend="blockdiag">blockdiag</link>
             </member>
             <member>
                 <link linkend="spec">spec</link>
index d0b4215..f8d3254 100644 (file)
@@ -69,7 +69,7 @@
             Если <literal>vm</literal> является разрежённой матрицей, то    <literal>diag(vm,k)</literal> возвращает разряжённую матрицу.
         </para>
         <para>
-            Чтобы построить диагональную линейную систему, используйте    <literal>sysdiag</literal>.
+            Чтобы построить диагональную линейную систему, используйте    <literal>blockdiag</literal>.
         </para>
         <para>
             Заметьте, что <literal>eye(A).*A</literal> возвращает диагональную матрицу, построенную с диагональными элементами из <literal>A</literal>. Это правильно для любой матрицы (констант, полиномиальной, рациональной, линейной системы пространств-состояний, ...).
@@ -100,7 +100,7 @@ m=5;diag(-m:m) +  diag(ones(2*m,1),1) +diag(ones(2*m,1),-1)
                 <link linkend="eye">eye</link>
             </member>
             <member>
-                <link linkend="sysdiag">sysdiag</link>
+                <link linkend="blockdiag">blockdiag</link>
             </member>
             <member>
                 <link linkend="spec">spec</link>
index d04c750..bedf5ff 100644 (file)
@@ -102,7 +102,7 @@ a=rand(5,5);[ab,x,bs]=bdiag(a);ab
                 <link linkend="spec">spec</link>
             </member>
             <member>
-                <link linkend="sysdiag">sysdiag</link>
+                <link linkend="blockdiag">blockdiag</link>
             </member>
         </simplelist>
     </refsection>
index 9651dd0..3a1892f 100644 (file)
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
 deff('j=jdrn(n)','j=zeros(n,n);for k=1:n-1;j(k,k+1)=1;end')
-A=sysdiag(jdrn(3),jdrn(2),rand(2,2));X=rand(7,7);
-A=X*A*inv(X);
-[S,P,D,index]=projspec(A);
+A = blockdiag(jdrn(3),jdrn(2),rand(2,2));
+X = rand(7,7);
+A = X*A*inv(X);
+[S,P,D,index] = projspec(A);
 index   //size of J-block
 trace(P)  //sum of dimensions of J-blocks
 A*S-(eye()-P)
index ab987f0..1544a79 100644 (file)
@@ -109,6 +109,9 @@ a=rand(5,5);[ab,x,bs]=bdiag(a);ab
             <member>
                 <link linkend="spec">spec</link>
             </member>
+            <member>
+                <link linkend="blockdiag">blockdiag</link>
+            </member>
         </simplelist>
     </refsection>
 </refentry>
index cade219..5ed528e 100644 (file)
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * 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="bdiag">
-
     <refnamediv>
-
         <refname>bdiag</refname>
-
         <refpurpose>ブロック対角化, 一般化固有ベクトル</refpurpose>
-
     </refnamediv>
-
     <refsynopsisdiv>
-
         <title>呼び出し手順</title>
-
         <synopsis>[Ab [,X [,bs]]]=bdiag(A [,rmax])</synopsis>
-
     </refsynopsisdiv>
-
     <refsection>
-
         <title>引数</title>
-
         <variablelist>
-
             <varlistentry>
-
                 <term>A</term>
-
                 <listitem>
-
                     <para>実数または複素数の正方行列</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>rmax</term>
-
                 <listitem>
-
                     <para>実数</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>Ab</term>
-
                 <listitem>
-
                     <para>実数または複素数の正方行列</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>X</term>
-
                 <listitem>
-
                     <para>実数または複素数の正則行列</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>bs</term>
-
                 <listitem>
-
                     <para>整数ベクトル</para>
-
                 </listitem>
-
             </varlistentry>
-
         </variablelist>
-
     </refsection>
-
     <refsection>
-
         <title>説明</title>
-
         <programlisting role=""><![CDATA[
 [Ab [,X [,bs]]]=bdiag(A [,rmax])
  ]]></programlisting>
-
         <para>
-
             は,行列<literal>A</literal>のブロック対角化を行ないます.
-
             bs はブロックの構造(個々のブロックの大きさ)を出力します.
-
             <literal>X</literal> は基底変換です.
-
             すなわち, <literal>Ab = inv(X)*A*X</literal> はブロック対角です.
-
         </para>
-
         <para>
-
             <literal>rmax</literal> は<literal>X</literal>の
-
             条件数を制御します;
-
             デフォルト値は <literal>A</literal> の l1ノルムです.
-
         </para>
-
         <para>
-
             (存在する場合,)対角形式を得るには<literal>rmax</literal>に
-
             大きな値を指定します(例えば,<literal>rmax=1/%eps</literal>).
-
             一般に(ランダムな実数の Aの場合) ブロックは (1x1) および (2x2) で,
-
             <literal>X</literal> は固有値の行列です.
-
         </para>
-
     </refsection>
-
     <refsection>
-
         <title>例</title>
-
         <programlisting role="example"><![CDATA[
 //実数の場合: 1x1 および 2x2 ブロック
 a=rand(5,5);[ab,x,bs]=bdiag(a);ab
+
 //複素数の場合: 複素数 1x1 ブロック
 [ab,x,bs]=bdiag(a+%i*0);ab
  ]]></programlisting>
-
     </refsection>
-
     <refsection role="see also">
-
         <title>参照</title>
-
         <simplelist type="inline">
-
             <member>
-
                 <link linkend="schur">schur</link>
-
             </member>
-
             <member>
-
                 <link linkend="sylv">sylv</link>
-
             </member>
-
             <member>
-
                 <link linkend="spec">spec</link>
-
             </member>
-
+            <member>
+                <link linkend="blockdiag">blockdiag</link>
+            </member>
         </simplelist>
-
     </refsection>
-
-</refentry>
-
+</refentry>
\ No newline at end of file
index 5894e91..8432213 100644 (file)
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * 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="projspec">
-
     <refnamediv>
-
         <refname>projspec</refname>
-
         <refpurpose>スペクトル演算子</refpurpose>
-
     </refnamediv>
-
     <refsynopsisdiv>
-
         <title>呼び出し手順</title>
-
         <synopsis>[S,P,D,i]=projspec(A)</synopsis>
-
     </refsynopsisdiv>
-
     <refsection>
-
         <title>引数</title>
-
         <variablelist>
-
             <varlistentry>
-
                 <term>A</term>
-
                 <listitem>
-
                     <para>正方行列</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>S, P, D</term>
-
                 <listitem>
-
                     <para>s正方行列</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>i</term>
-
                 <listitem>
-
                     <para>
-
                         整数 (<literal>A</literal>のゼロ固有値の添字).
-
                     </para>
-
                 </listitem>
-
             </varlistentry>
-
         </variablelist>
-
     </refsection>
-
     <refsection>
-
         <title>説明</title>
-
         <para>
-
             <literal>A</literal>の0におけるスペクトル特性.
-
         </para>
-
         <para>
-
             <literal>S</literal> = 0における縮小レゾルベント
-
             (<literal>S</literal> = -Drazin_inverse(<literal>A</literal>)).
-
         </para>
-
         <para>
-
             <literal>P</literal> = 0におけるスペクトル投影.
-
         </para>
-
         <para>
-
             <literal>D</literal> = 0における冪零演算子.
-
         </para>
-
         <para>
-
             <literal>index</literal> = 0固有値の添字.
-
         </para>
-
         <para>
-
             特異点s=0の周りでの
-
             <literal>(s*eye()-A)^(-1) = D^(i-1)/s^i +... + D/s^2 + P/s - S - s*S^2 -...</literal>
-
             が出力されます.
-
         </para>
-
     </refsection>
-
     <refsection>
-
         <title>例</title>
-
         <programlisting role="example"><![CDATA[
 deff('j=jdrn(n)','j=zeros(n,n);for k=1:n-1;j(k,k+1)=1;end')
-A=sysdiag(jdrn(3),jdrn(2),rand(2,2));X=rand(7,7);
-A=X*A*inv(X);
+A = blockdiag(jdrn(3),jdrn(2),rand(2,2));
+X = rand(7,7);
+A = X*A*inv(X);
 [S,P,D,index]=projspec(A);
 index   //J-ブロックの大きさ
 trace(P)  //J-ブロックの次元の合計
 A*S-(eye()-P)
 norm(D^index,1)
  ]]></programlisting>
-
     </refsection>
-
     <refsection role="see also">
-
         <title>参照</title>
-
         <simplelist type="inline">
-
             <member>
-
                 <link linkend="coff">coff</link>
-
             </member>
-
         </simplelist>
-
     </refsection>
-
-</refentry>
-
+</refentry>
\ No newline at end of file
index 3ec9449..7aff17d 100644 (file)
@@ -106,6 +106,9 @@ a=rand(5,5);[ab,x,bs]=bdiag(a);ab
             <member>
                 <link linkend="spec">spec</link>
             </member>
+            <member>
+                <link linkend="blockdiag">blockdiag</link>
+            </member>
         </simplelist>
     </refsection>
 </refentry>
index da51b80..1d0d3a5 100644 (file)
         <title>Exemplos</title>
         <programlisting role="example"><![CDATA[
 deff('j=jdrn(n)','j=zeros(n,n);for k=1:n-1;j(k,k+1)=1;end')
-A=sysdiag(jdrn(3),jdrn(2),rand(2,2));X=rand(7,7);
-A=X*A*inv(X);
-[S,P,D,index]=projspec(A);
+A = blockdiag(jdrn(3),jdrn(2),rand(2,2));
+X = rand(7,7);
+A = X*A*inv(X);
+[S,P,D,index] = projspec(A);
 index   //tamanho do bloco J
 trace(P)  //soma das dimensões dos blocos J
 A*S-(eye()-P)
index 77d421e..3c4f479 100644 (file)
@@ -48,6 +48,6 @@ function A = companion(p)
             B=diag(ones(1,n-2),-1);
             B(1,:) = -c(2:n)/c(1);
         end
-        A=sysdiag(A,B);
+        A=blockdiag(A,B);
     end
 endfunction
index 3bf2f52..259f861 100644 (file)
@@ -45,7 +45,7 @@ function [M,Q]=eigenmarkov(P)
         p=p+rec1(kk);
         Mres=Mn(classe,classe);
         w=kernel((Mres-eye())')';
-        M=sysdiag(M,w./sum(w));
+        M=blockdiag(M,w./sum(w));
     end
     M=[M,zeros(size(M,1),size(P,1)-size(M,2))];
     M=M(:,perminv);
index 1cf0172..b517a37 100644 (file)
@@ -23,7 +23,7 @@ function M=genmarkov(rec,tr,flag)
     for k=rec
         m=rand(k,k,"u");
         m=m./(sum(m,"c")*ones(1,k));
-        M=sysdiag(M,m);
+        M=blockdiag(M,m);
     end
     if type(tr) ~= 15 then
         n=r+tr;
@@ -36,7 +36,7 @@ function M=genmarkov(rec,tr,flag)
         Q=[];
         for kk=1:l
             nt=tr(1+2*(kk-1));
-            Q=sysdiag(Q,rand(nt,nt));
+            Q=blockdiag(Q,rand(nt,nt));
         end
         Nt=size(Q,1);
         L=[];
index 44ed320..20c4dd3 100644 (file)
@@ -44,7 +44,7 @@ function F=randpencil(eps,infi,fin,eta)
 
     J=[];
     for kk=infi;
-        J=sysdiag(J,%jdrn(kk));
+        J=blockdiag(J,%jdrn(kk));
     end
     if J==[] then Infin=[],else Infin=%s*J-eye();end
 
@@ -55,7 +55,7 @@ function F=randpencil(eps,infi,fin,eta)
     if ~flageps then
         for k=seps;
             if k==0 then [p,q]=size(Eps); Eps=[Eps,zeros(p,1)];end
-            if k<>0 then Eps=sysdiag(Eps,%epsilon(k));end
+            if k<>0 then Eps=blockdiag(Eps,%epsilon(k));end
         end
     end
 
@@ -66,11 +66,11 @@ function F=randpencil(eps,infi,fin,eta)
     if ~flageta then
         for k=seta;
             if k==0 then [p,q]=size(Eta); Eta=[Eta;zeros(1,q)];end
-            if k<>0 then Eta=sysdiag(Eta,%eta(k));end
+            if k<>0 then Eta=blockdiag(Eta,%eta(k));end
         end
     end
 
-    F=sysdiag(Eps,Infin,Fin,Eta);
+    F=blockdiag(Eps,Infin,Fin,Eta);
 
     [p,q]=size(F);ncols=q;
 
index 04bab71..822fe9c 100644 (file)
@@ -42,7 +42,7 @@ function [Xp,dima,dimb,dim]=spantwo(A,B)
         //   Which is better?
         B1B2=B1B2B3(1:dima,:);[W,dimb0]=rowcomp(B1B2);W=W(dima:-1:1,:);
         [n1,n2]=size(A);
-        Xp=sysdiag(W,eye(n1-dima,n1-dima))*Xp;
+        Xp=blockdiag(W,eye(n1-dima,n1-dima))*Xp;
         return;
     end
     Q=[eye(dima,dima),zeros(dima,dim-dima);
index 6e4492a..1e8ea94 100644 (file)
@@ -373,7 +373,7 @@ options=[10,1.d-10,1.d-10,0,50];
 // Unpack CZ
 Z=unpack(CZ,blocksizes);
 w=vec2list(Z,[blocksizes;blocksizes]);
-Z=sysdiag(w(1),w(2))
+Z=blockdiag(w(1),w(2))
 
 c'*x+trace(F0*Z)
 // Check that the eigenvalues of the matrix are positive
index 2209f45..c72d9fc 100644 (file)
@@ -257,13 +257,13 @@ function [%Xlist,%OPT]=lmisolver(%Xinit,%evalfunc,%options)
         %Z0 = %Z0 / (%Id'*%Z0(1:%ka));    // make Tr Z0 = 1
 
         if %f then //for checking semidef
-            Z=sysdiag(matrix(%Z0(1:16),4,-1),%Z0(17))
-            F0=full(sysdiag(matrix(%I0v,4,-1), %M-%Id'*%I0v));
+            Z=blockdiag(matrix(%Z0(1:16),4,-1),%Z0(17))
+            F0=full(blockdiag(matrix(%I0v,4,-1), %M-%Id'*%I0v));
             for i=1:10,
-                Fi=full(sysdiag(matrix(%I(:,i),4,-1),-%Id'*%I(:,i)));
+                Fi=full(blockdiag(matrix(%I(:,i),4,-1),-%Id'*%I(:,i)));
                 mprintf("i=%d %e\n",i,abs(trace(Fi*Z)-%c(i)));
             end
-            F11=sysdiag(matrix(%Id,4,-1),0);
+            F11=blockdiag(matrix(%Id,4,-1),0);
             mprintf("i=%d %e\n",11,abs(trace(F11*Z)-%c(11)))
 
         end
index ab5af76..a947dcb 100644 (file)
@@ -78,7 +78,7 @@ options=[nu,abstol,reltol,tv,maxiters];
 Z=unpack(CZ,blocksizes);
 w=vec2list(Z,[blocksizes;blocksizes]);
 
-Z=sysdiag(w(1),w(2));
+Z=blockdiag(w(1),w(2));
 // Check that info states that absolute convergence occurred
 assert_checkequal(info(1),2);
 // Check that ul contains the expected values
index bbe4414..87af289 100644 (file)
@@ -31,7 +31,7 @@ function s=%lss_m_s(s1,D2)
             return;
         end
         w=s1;
-        for k=2:mq, w=sysdiag(w,s1);end
+        for k=2:mq, w=blockdiag(w,s1);end
         s=w*M;s=Q*s;
         return;
     end
index 6051648..a44380d 100644 (file)
@@ -112,6 +112,7 @@ std::unordered_map<std::wstring, std::wstring> DeprecatedChecker::initDep()
     map.emplace(L"nanmax", L"max");
     map.emplace(L"numer", L".num");
     map.emplace(L"square", L"replot");
+    map.emplace(L"sysdiag", L"blockdiag");
     map.emplace(L"with_tk", L"with_module('tclsci')");
     map.emplace(L"xgetech", L"gca");
     map.emplace(L"xinfo", L"gcf().info_message");