version 1.4, 2003/07/27 13:18:46 |
version 1.6, 2004/03/05 15:56:40 |
|
|
/* $OpenXM: OpenXM/src/asir-contrib/packages/doc/m.oxweave,v 1.3 2003/07/16 05:36:24 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/asir-contrib/packages/doc/m.oxweave,v 1.5 2004/03/05 15:30:50 ohara Exp $ */ |
/* Use oxweave to generate documents on this source code |
/* Use oxweave to generate documents on this source code |
Use iso-2022 to write this file. No default use of GL and GR is allowed. |
Use iso-2022 to write this file. No default use of GL and GR is allowed. |
*/ |
*/ |
|
|
|
|
/*&C-texi |
/*&C |
@c DO NOT EDIT THIS FILE oxmath.texi It is automatically generated |
@c DO NOT EDIT THIS FILE oxmath.texi It is automatically generated |
@c from asir-contrib/packages/doc/m.oxweave |
@c from asir-contrib/packages/doc/m.oxweave |
@node Mathematica Functions,,, Top |
@node Mathematica Functions,,, Top |
|
|
|
|
|
|
*/ |
*/ |
/*&jp-texi |
/*&ja |
@chapter Mathematica $BH!?t(B |
@chapter Mathematica $BH!?t(B |
|
|
$B$3$N@a$G$O(B Mathematica $B$N(B ox $B%5!<%P(B @code{ox_math} |
$B$3$N@a$G$O(B Mathematica $B$N(B ox $B%5!<%P(B @code{ox_math} |
|
|
|
|
$BCm0U(B: @code{ox_reset} $B$OF0$+$J$$(B. |
$BCm0U(B: @code{ox_reset} $B$OF0$+$J$$(B. |
*/ |
*/ |
/*&eg-texi |
/*&en |
@chapter Mathematica Functions |
@chapter Mathematica Functions |
|
|
This chapter describes interface functions for |
This chapter describes interface functions for |
Line 39 The file @file{m} is at @file{$(OpenXM_HOME)/lib/asir- |
|
Line 39 The file @file{m} is at @file{$(OpenXM_HOME)/lib/asir- |
|
|
|
Note: @code{ox_reset} does not work. |
Note: @code{ox_reset} does not work. |
*/ |
*/ |
/*&C-texi |
/*&C |
@example |
@example |
@include opening.texi |
@include opening.texi |
[258] load("m")$ |
[258] load("m")$ |
Line 54 See OpenXM/Copyright/Copyright.mathlink for details. |
|
Line 54 See OpenXM/Copyright/Copyright.mathlink for details. |
|
@end example |
@end example |
*/ |
*/ |
|
|
/*&C-texi |
/*&C |
@noindent |
@noindent |
@code{Mathematica} is the trade mark of Wolfram Research Inc. |
@code{Mathematica} is the trade mark of Wolfram Research Inc. |
This package requires Mathmatica Version 3.0, so you need |
This package requires Mathmatica Version 3.0, so you need |
Line 71 Author of @code{ox_math}: Katsuyoshi Ohara, |
|
Line 71 Author of @code{ox_math}: Katsuyoshi Ohara, |
|
*/ |
*/ |
|
|
|
|
/*&jp-texi |
/*&ja |
@section $BH!?t0lMw(B |
@section $BH!?t0lMw(B |
*/ |
*/ |
/*&eg-texi |
/*&en |
@section Functions |
@section Functions |
*/ |
*/ |
/*&jp-texi |
/*&ja |
@node mathematica.start,,, Mathematica Functions |
@node mathematica.start,,, Mathematica Functions |
@subsection @code{mathematica.start} |
@subsection @code{mathematica.start} |
@findex mathematica.start |
@findex mathematica.start |
Line 98 Author of @code{ox_math}: Katsuyoshi Ohara, |
|
Line 98 Author of @code{ox_math}: Katsuyoshi Ohara, |
|
@item $B<1JLHV9f$O(B @code{M_proc} $B$K3JG<$5$l$k(B. |
@item $B<1JLHV9f$O(B @code{M_proc} $B$K3JG<$5$l$k(B. |
@end itemize |
@end itemize |
*/ |
*/ |
/*&eg-texi |
/*&en |
@node mathematica.start,,, Mathematica Functions |
@node mathematica.start,,, Mathematica Functions |
@subsection @code{mathematica.start} |
@subsection @code{mathematica.start} |
@findex mathematica.start |
@findex mathematica.start |
|
|
@item The descriptor is stored in the variable @code{M_proc}. |
@item The descriptor is stored in the variable @code{M_proc}. |
@end itemize |
@end itemize |
*/ |
*/ |
/*&C-texi |
/*&C |
@example |
@example |
P = mathematica.start() |
P = mathematica.start() |
@end example |
@end example |
*/ |
*/ |
/*&jp-texi |
/*&ja |
@table @t |
@table @t |
@item $B;2>H(B |
@item $B;2>H(B |
@code{ox_launch} |
@code{ox_launch} |
@end table |
@end table |
*/ |
*/ |
/*&eg-texi |
/*&en |
@table @t |
@table @t |
@item Reference |
@item Reference |
@code{ox_launch} |
@code{ox_launch} |
Line 141 P = mathematica.start() |
|
Line 141 P = mathematica.start() |
|
$B0J2<$G(BMathematica $B$r8F$V$?$a$NJd=u4X?t$rDj5A$9$k(B. |
$B0J2<$G(BMathematica $B$r8F$V$?$a$NJd=u4X?t$rDj5A$9$k(B. |
*/ |
*/ |
|
|
/*&jp-texi |
/*&ja |
@node mathematica.tree_to_string,,, Mathematica Functions |
@node mathematica.tree_to_string,,, Mathematica Functions |
@subsection @code{mathematica.tree_to_string} |
@subsection @code{mathematica.tree_to_string} |
@findex mathematica.tree_to_string |
@findex mathematica.tree_to_string |
Line 171 ox_math $B$NLa$9(B Mathematica $B$NLZ9=B$%G!<%?(B |
|
Line 171 ox_math $B$NLa$9(B Mathematica $B$NLZ9=B$%G!<%?(B |
|
$B$+$($k(B. |
$B$+$($k(B. |
@end itemize |
@end itemize |
*/ |
*/ |
/*&eg-texi |
/*&en |
@node mathematica.tree_to_string,,, Mathematica Functions |
@node mathematica.tree_to_string,,, Mathematica Functions |
@subsection @code{mathematica.tree_to_string} |
@subsection @code{mathematica.tree_to_string} |
@findex mathematica.tree_to_string |
@findex mathematica.tree_to_string |
Line 205 be understandable by @code{asir}. |
|
Line 205 be understandable by @code{asir}. |
|
@code{m_(the key word)}. |
@code{m_(the key word)}. |
@end itemize |
@end itemize |
*/ |
*/ |
/*&C-texi |
/*&C |
@example |
@example |
[267] mathematica.start(); |
[267] mathematica.start(); |
0 |
0 |
Line 219 be understandable by @code{asir}. |
|
Line 219 be understandable by @code{asir}. |
|
x^2-2*x+1 |
x^2-2*x+1 |
@end example |
@end example |
*/ |
*/ |
/*&C-texi |
/*&C |
@example |
@example |
[259] mathematica.tree_to_string(["List",1,2]); |
[259] mathematica.tree_to_string(["List",1,2]); |
[1 , 2] |
[1 , 2] |
Line 233 mathematica.complex(2.3 , 4.55) |
|
Line 233 mathematica.complex(2.3 , 4.55) |
|
(1.7+3.5*@@i) |
(1.7+3.5*@@i) |
@end example |
@end example |
*/ |
*/ |
/*&jp-texi |
/*&ja |
@table @t |
@table @t |
@item $B;2>H(B |
@item $B;2>H(B |
@code{ox_pop_cmo}, @code{eval_str}, @code{mathematica.rtomstr} |
@code{ox_pop_cmo}, @code{eval_str}, @code{mathematica.rtomstr} |
@end table |
@end table |
*/ |
*/ |
/*&eg-texi |
/*&en |
@table @t |
@table @t |
@item Reference |
@item Reference |
@code{ox_pop_cmo}, @code{eval_str}, @code{mathematica.rtomstr} |
@code{ox_pop_cmo}, @code{eval_str}, @code{mathematica.rtomstr} |
Line 256 mathematica.complex(2.3 , 4.55) |
|
Line 256 mathematica.complex(2.3 , 4.55) |
|
$BJQ$($k(B. |
$BJQ$($k(B. |
*/ |
*/ |
|
|
/*&jp-texi |
/*&ja |
@node mathematica.rtomstr,,, Mathematica Functions |
@node mathematica.rtomstr,,, Mathematica Functions |
@subsection @code{mathematica.rtomstr} |
@subsection @code{mathematica.rtomstr} |
@findex mathematica.rtomstr |
@findex mathematica.rtomstr |
Line 279 mathematica.complex(2.3 , 4.55) |
|
Line 279 mathematica.complex(2.3 , 4.55) |
|
$B$3$N4X?t$O$3$NJQ49$r$*$3$J$&(B. |
$B$3$N4X?t$O$3$NJQ49$r$*$3$J$&(B. |
@end itemize |
@end itemize |
*/ |
*/ |
/*&eg-texi |
/*&en |
@node mathematica.rtomstr,,, Mathematica Functions |
@node mathematica.rtomstr,,, Mathematica Functions |
@subsection @code{mathematica.rtomstr} |
@subsection @code{mathematica.rtomstr} |
@findex mathematica.rtomstr |
@findex mathematica.rtomstr |
Line 304 but @code{Mathematica} uses @code{@{}, @code{@}}. |
|
Line 304 but @code{Mathematica} uses @code{@{}, @code{@}}. |
|
This function makes this sort of translations. |
This function makes this sort of translations. |
@end itemize |
@end itemize |
*/ |
*/ |
/*&C-texi |
/*&C |
@example |
@example |
[259] mathematica.rtomstr([1,2,3]); |
[259] mathematica.rtomstr([1,2,3]); |
@{1,2,3@} |
@{1,2,3@} |
Line 312 This function makes this sort of translations. |
|
Line 312 This function makes this sort of translations. |
|
@{@{1,x,x^2@},@{1,y,y^2@}@} |
@{@{1,x,x^2@},@{1,y,y^2@}@} |
@end example |
@end example |
*/ |
*/ |
/*&jp-texi |
/*&ja |
$B$b$&0l$DNc$r$"$2$h$&(B. |
$B$b$&0l$DNc$r$"$2$h$&(B. |
$B<!$N4X?t(B @code{mathematica.inverse(M)} $B$O(B @code{ox_math} |
$B<!$N4X?t(B @code{mathematica.inverse(M)} $B$O(B @code{ox_math} |
$B$r$h$s$G9TNs(B @code{M} $B$N5U9TNs$r7W;;$9$k4X?t$G$"$k(B. |
$B$r$h$s$G9TNs(B @code{M} $B$N5U9TNs$r7W;;$9$k4X?t$G$"$k(B. |
Line 321 asir $B$N9TNs$r(B Mathematica $B7A<0$KJQ49$7$F$+$i |
|
Line 321 asir $B$N9TNs$r(B Mathematica $B7A<0$KJQ49$7$F$+$i |
|
@code{ox_execute_string} $B$G(B Mathematica $B$K5U9TNs$r7W;;(B |
@code{ox_execute_string} $B$G(B Mathematica $B$K5U9TNs$r7W;;(B |
$B$5$;$F$$$k(B. |
$B$5$;$F$$$k(B. |
*/ |
*/ |
/*&eg-texi |
/*&en |
Let us see one more example. |
Let us see one more example. |
The following function @code{mathematica.inverse(M)} outputs |
The following function @code{mathematica.inverse(M)} outputs |
the inverse matrix of the matrix @code{M} by calling @code{ox_math}. |
the inverse matrix of the matrix @code{M} by calling @code{ox_math}. |
Line 330 by @code{r_tostr(M)} |
|
Line 330 by @code{r_tostr(M)} |
|
and makes Mathematica compute the inverse matrix of @code{M} by |
and makes Mathematica compute the inverse matrix of @code{M} by |
@code{ox_execute_string}. |
@code{ox_execute_string}. |
*/ |
*/ |
/*&C-texi |
/*&C |
@example |
@example |
def inverse(M) @{ |
def inverse(M) @{ |
P = 0; |
P = 0; |
Line 348 def inverse(M) @{ |
|
Line 348 def inverse(M) @{ |
|
(z*y)/(x^2+(-y-z)*x+z*y) |
(z*y)/(x^2+(-y-z)*x+z*y) |
@end example |
@end example |
*/ |
*/ |
/*&jp-texi |
/*&ja |
@table @t |
@table @t |
@item $B;2>H(B |
@item $B;2>H(B |
@code{ox_execute_string}, @code{ToExpression}(Mathematica), |
@code{ox_execute_string}, @code{ToExpression}(Mathematica), |
@code{mathematica.tree_to_string} |
@code{mathematica.tree_to_string} |
@end table |
@end table |
*/ |
*/ |
/*&eg-texi |
/*&en |
@table @t |
@table @t |
@item Reference |
@item Reference |
@code{ox_execute_string}, @code{ToExpression}(Mathematica), |
@code{ox_execute_string}, @code{ToExpression}(Mathematica), |