Annotation of OpenXM/src/asir-contrib/packages/doc/Matrix.texi, Revision 1.5
1.5 ! takayama 1: @c $OpenXM: OpenXM/src/asir-contrib/packages/doc/Matrix.texi,v 1.4 2001/06/24 01:14:22 takayama Exp $
1.4 takayama 2: @node Matrix operations (library by Okutani),,, Top
1.5 ! takayama 3: @chapter Matrix operations (library by Okutani)
1.4 takayama 4: $B%U%!%$%k(B @file{gr} $B$,I,MW$G$9(B.
5:
6: Yukio Okutani $B;a$K$h$k(B Risa/Asir $B8@8l$G=q$+$l$?9TNs7W;;MQ$N%i%$%V%i%j$G$9(B.
7: $B$9$Y$F$N4X?tL>$O(B omatrix_ $B$G;O$^$j$^$9(B.
8:
1.1 takayama 9: @menu
1.4 takayama 10: * omatrix_1::
11: * omatrix_diag::
12: * omatrix_trans::
13: * omatrix_inverse::
14: * omatrix_solve::
15: * omatrix_kernel::
1.1 takayama 16: @end menu
17:
1.4 takayama 18: @node omatrix_1,,, Matrix operations (library by Okutani)
19: @subsection @code{omatrix_1}
20: @findex omatrix_1
1.1 takayama 21: @table @t
1.4 takayama 22: @item omatrix_1(@var{N})
1.1 takayama 23: :: @var{N} $B<!C10L9TNs$r@8@.$7$^$9(B.
24: @end table
25: @table @var
26: @item return
27: $B9TNs(B
28: @item N
29: $B@0?t(B
30: @end table
31: @itemize @bullet
1.4 takayama 32: @item @code{omatrix_1}$B$NNc(B.
1.1 takayama 33: @end itemize
34: @example
1.4 takayama 35: [297] omatrix_1(1);
1.1 takayama 36: [ 1 ]
37:
1.4 takayama 38: [298] omatrix_1(2);
1.1 takayama 39: [ 1 0 ]
40: [ 0 1 ]
41:
1.4 takayama 42: [299] omatrix_1(3);
1.1 takayama 43: [ 1 0 0 ]
44: [ 0 1 0 ]
45: [ 0 0 1 ]
46: @end example
47:
1.4 takayama 48: @node omatrix_diag,,, Matrix operations (library by Okutani)
49: @subsection @code{omatrix_diag}
50: @findex omatrix_diag
1.1 takayama 51: @table @t
1.4 takayama 52: @item omatrix_diag(@var{L})
1.1 takayama 53: :: $B%j%9%H(B @var{L} $B$NMWAG$rBP3Q@.J,$H$9$kBP3Q9TNs$r@8@.$7$^$9(B.
54: @end table
55: @table @var
56: @item return
57: $B9TNs(B
58: @item L
59: $B%j%9%H(B
60: @end table
61: @itemize @bullet
1.4 takayama 62: @item @code{omatrix_diag}$B$NNc(B.
1.1 takayama 63: @end itemize
64: @example
1.4 takayama 65: [301] omatrix_diag([1,2,3]);
1.1 takayama 66: [ 1 0 0 ]
67: [ 0 2 0 ]
68: [ 0 0 3 ]
69:
1.4 takayama 70: [302] omatrix_diag([a,b,c]);
1.1 takayama 71: [ a 0 0 ]
72: [ 0 b 0 ]
73: [ 0 0 c ]
74: @end example
75:
1.4 takayama 76: @node omatrix_trans,,, Matrix operations (library by Okutani)
77: @subsection @code{omatrix_trans}
78: @findex omatrix_trans
1.1 takayama 79: @table @t
1.4 takayama 80: @item omatrix_trans(@var{A})
1.1 takayama 81: :: $B9TNs(B @var{A} $B$NE>CV9TNs$r5a$a$^$9(B.
82: @end table
83: @table @var
84: @item return
85: $B9TNs(B
86: @item A
87: $B9TNs(B or $B%j%9%H(B
88: @end table
89: @itemize @bullet
1.4 takayama 90: @item @code{omatrix_trans}$B$NNc(B.
1.1 takayama 91: @end itemize
92: @example
1.4 takayama 93: [303] omatrix_trans([[a,b],[c,d]]);
1.1 takayama 94: [ a c ]
95: [ b d ]
96:
1.4 takayama 97: [304] omatrix_trans([[1,2,3],[4,5,6],[7,8,9]]);
1.1 takayama 98: [ 1 4 7 ]
99: [ 2 5 8 ]
100: [ 3 6 9 ]
101: @end example
102:
1.4 takayama 103: @node omatrix_inverse,,, Matrix operations (library by Okutani)
104: @subsection @code{omatrix_inverse}
105: @findex omatrix_inverse
1.1 takayama 106: @table @t
1.4 takayama 107: @item omatrix_inverse(@var{A})
1.1 takayama 108: :: $B9TNs(B @var{A} $B$N5U9TNs$r5a$a$^$9(B.
109: @end table
110: @table @var
111: @item return
112: $B9TNs(B
113: @item A
114: $B9TNs(B or $B%j%9%H(B
115: @end table
116: @itemize @bullet
117: @item $B9TNs(B @var{A} $B$N@.J,$OM-M}?t(B or $BB?9`<0(B.
1.4 takayama 118: @item @code{omatrix_inverse}$B$NNc(B.
1.1 takayama 119: @end itemize
120: @example
1.4 takayama 121: [309] omatrix_inverse([[1,1],[1,2]]);
1.1 takayama 122: [ 2 -1 ]
123: [ -1 1 ]
124:
1.4 takayama 125: [310] omatrix_inverse([[a,b],[c,d]]);
1.1 takayama 126: [ (d)/(d*a-c*b) (-b)/(d*a-c*b) ]
127: [ (-c)/(d*a-c*b) (a)/(d*a-c*b) ]
128: @end example
129:
1.4 takayama 130: @node omatrix_solve,,, Matrix operations (library by Okutani)
131: @subsection @code{omatrix_solve}
132: @findex omatrix_solve
1.1 takayama 133: @table @t
1.4 takayama 134: @item omatrix_solve(@var{A},@var{X},@var{Y})
135: :: @code{omatrix_solve}$B$OJ}Dx<0(B A*X=Y $B$N2r$r5a$a$^$9(B.
1.1 takayama 136: @end table
137: @table @var
138: @item return
139: $B%j%9%H(B
140: @item A
141: $B9TNs(B or $B%j%9%H(B
142: @item X
143: $B%Y%/%H%k(B or $B%j%9%H(B
144: @item Y
145: $B%Y%/%H%k(B or $B%j%9%H(B
146: @end table
147: @itemize @bullet
148: @item $B9TNs(B @var{A} $B$N@.J,$OM-M}?t(B or $BB?9`<0(B.
1.4 takayama 149: @item @code{omatrix_solve}$B$NNc(B.
1.1 takayama 150: @end itemize
151: @example
1.4 takayama 152: [376] omatrix_solve([[1,-1],[2,3]],[x,y],[1,1]);
1.1 takayama 153: [[x,4/5],[y,-1/5]]
154:
1.4 takayama 155: [377] omatrix_solve([[a,b],[c,d]],[x,y],[1,1]);
1.1 takayama 156: [[x,(-b+d)/(d*a-c*b)],[y,(a-c)/(d*a-c*b)]]
157: @end example
158:
1.4 takayama 159: @node omatrix_kernel,,, Matrix operations (library by Okutani)
160: @subsection @code{omatrix_kernel}
161: @findex omatrix_kernel
1.1 takayama 162: @table @t
1.4 takayama 163: @item omatrix_kernel(@var{A})
164: :: @code{omatrix_kernel}$B$O9TNs(B A $B$N(B kernel $B$N4pDl$r5a$a$^$9(B.
1.1 takayama 165: @end table
166: @table @var
167: @item return
168: $B%j%9%H(B
169: @item A
170: $B9TNs(B or $B%j%9%H(B
171: @end table
172: @itemize @bullet
173: @item $B9TNs(B @var{A} $B$N@.J,$OM-M}?t(B or $BB?9`<0(B.
1.4 takayama 174: @item @code{omatrix_kernel}$B$NNc(B.
1.1 takayama 175: @end itemize
176: @example
1.4 takayama 177: [383] omatrix_kernel([[1,2,3,4],[1,0,1,0]]);
1.1 takayama 178: [2,[[1,0,-1,1/2],[0,1,0,-1/2]]]
179:
1.4 takayama 180: [384] omatrix_kernel([[1,2,3,4],[1,0,1,0],[0,0,0,1]]);
1.1 takayama 181: [1,[[1,1,-1,0]]]
182: @end example
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>