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