help pages: toeplitz overhauled. diag, sparse, speye improved
[scilab.git] / scilab / modules / elementary_functions / help / ja_JP / elementarymatrices / diag.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17           xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
18           xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
19           xmlns:scilab="http://www.scilab.org" xml:id="diag" xml:lang="ja">
20     <refnamediv>
21         <refname>diag</refname>
22         <refpurpose>対角行列の構築または展開</refpurpose>
23     </refnamediv>
24     <refsynopsisdiv>
25         <title>呼び出し手順</title>
26         <synopsis>
27             y = diag(vm)
28             y = diag(vm, k)
29         </synopsis>
30     </refsynopsisdiv>
31     <refsection>
32         <title>引数</title>
33         <variablelist>
34             <varlistentry>
35                 <term>vm</term>
36                 <listitem>
37                     <para>ベクトルまたは行列 (完全または疎行列)</para>
38                 </listitem>
39             </varlistentry>
40             <varlistentry>
41                 <term>k</term>
42                 <listitem>
43                     <para>整数 (デフォルト値 0)</para>
44                 </listitem>
45             </varlistentry>
46             <varlistentry>
47                 <term>y</term>
48                 <listitem>
49                     <para>ベクトルまたは行列</para>
50                 </listitem>
51             </varlistentry>
52         </variablelist>
53     </refsection>
54     <refsection>
55         <title>説明</title>
56         <para>
57             n次(行または列) ベクトル<literal>vm</literal> に関して,
58             <literal>diag(vm)</literal> は<literal>vm</literal>のエントリを
59             主対角項とする対角行列を返します.
60         </para>
61         <para>
62             <literal>diag(vm,k)</literal> は,<literal>vm</literal>の
63             エントリを k番目の対角項とする
64             <literal>(n+abs(k))x(n+abs(k))</literal>行列を返します.
65             <literal>k=0</literal>は主対角,
66             <literal>k&gt;0</literal> は上方対角,
67             <literal>k&lt;0</literal> は下方対角です.
68         </para>
69         <para>
70             <literal>vm</literal>が行列の場合, <literal>diag(vm,k)</literal> は
71             <literal>vm</literal>の k番目の対角項のエントリからなる
72             列ベクトルとなります.
73             <literal>diag(vm)</literal> は<literal>vm</literal>の主対角項です.
74             <literal>diag(diag(x))</literal> は対角行列です.
75         </para>
76         <para>
77             <literal>vm</literal> が疎行列の場合,
78             <literal>diag(vm,k)</literal> は疎行列を返します.
79         </para>
80         <para>対角線形システムを構築するには,
81             <literal>sysdiag</literal>を使用してください.
82         </para>
83         <para>
84             <literal>eye(A).*A</literal> は
85             <literal>A</literal>の対角エントリからなる対角行列を
86             返すことに注意してください.
87             これは,任意の行列(定数,多項式,有理数,状態空間線形システム,...)
88             で有効です.
89         </para>
90     </refsection>
91     <refsection>
92         <title>例</title>
93         <programlisting role="example"><![CDATA[
94 diag([1,2])
95
96 A=[1,2;3,4];
97 diag(A)  // main diagonal
98 diag(A,1)
99
100 diag(sparse(1:10))  // sparse diagonal matrix
101
102 // form a tridiagonal matrix of size 2*m+1
103 m=5;diag(-m:m) +  diag(ones(2*m,1),1) +diag(ones(2*m,1),-1)
104  ]]></programlisting>
105     </refsection>
106     <refsection role="see also">
107         <title>参照</title>
108         <simplelist type="inline">
109             <member>
110                 <link linkend="toeplitz">toeplitz</link>
111             </member>
112             <member>
113                 <link linkend="eye">eye</link>
114             </member>
115             <member>
116                 <link linkend="sysdiag">sysdiag</link>
117             </member>
118             <member>
119                 <link linkend="spec">spec</link>
120             </member>
121             <member>
122                 <link linkend="bdiag">bdiag</link>
123             </member>
124         </simplelist>
125     </refsection>
126 </refentry>