from 2015-6-7

自分用の備忘録としてネット上にも残しておこうと思い書いています

maple-ファイルの書き出し読み込み.txt

#mapleのターミナル版をemacsを用いながら使うやりかた。

mplファイルを使う
“>”が入らない。

カレントディレクトリの確認
currentdir();
次のようにしてカレントディレクトリを/Users/hiro/に変更する。
curretdir(“/Users/hiro/“)


Maple language format, .mplの拡張子を持つ。
mplファイルの中身
diff(x^2,x);
#This is how to differentiate a function
;

“>”は必要ない。
>diff(x^2,x)
ではない。
#をつけるとコメント

保存は.mplの拡張子をつけて、example1.mpl

読み込む場合
read(“example1.mpl”)

結果の表示
interface(echo)で返る値で
表示が異なる。
デフォールトが1. —> 2 xという結果のみ表示
2以上にすると、読み込んだmplファイルに書かれたinput
と結果の両方が表示。

interface(echo=2)
read "untitled2.mpl";
>
> diff(x^2,x);
                              2 x
#This is how to differentiate a function
> ;
>


参考 mapleprimesのQuestion: call a code in maple
http://www.mapleprimes.com/questions/204765-Call-A-Code-In-Maple