[ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Contents] [Index] [ ? ]

# 75. opsubst

 [ < ] [ > ] [ << ] [ Up ] [ >> ] [Top] [Contents] [Index] [ ? ]

## 75.1 Functions and Variables for opsubst

 ```(%i1) load ("opsubst")\$ (%i2) opsubst(f,g,g(g(x))); (%o2) f(f(x)) (%i3) opsubst(f,g,g(g)); (%o3) f(g) (%i4) opsubst(f,g[x],g[x](z)); (%o4) f(z) (%i5) opsubst(g[x],f, f(z)); (%o5) g (z) x (%i6) opsubst(tan, sin, sin(sin)); (%o6) tan(sin) (%i7) opsubst([f=g,g=h],f(x)); (%o7) h(x) ```

 ```(%i8) opsubst("+","-",a-b); (%o8) a - b (%i9) opsubst("f","-",-a); (%o9) - a (%i10) opsubst("^^","/",a/b); a (%o10) - b ```

-a*bの内部表現は *(-1,a,b)です; 例えば、

 ```(%i11) opsubst("[","*", -a*b); (%o11) [- 1, a, b] ```

どちらかの演算子が Maximaシンボルでない時、他のある関数は一般にエラーを知らせます:

 ```(%i12) opsubst(a+b,f, f(x)); Improper name or value in functional position: b + a -- an error. Quitting. To debug this try debugmode(true); ```

しかしながら、添字付き演算子は許されます:

 ```(%i13) opsubst(g[5],f, f(x)); (%o13) g (x) 5 ```

この関数を使うためには最初に `load("opsubst")`と書いてください。

 [ << ] [ >> ] [Top] [Contents] [Index] [ ? ]

This document was generated by 市川雄二 on June, 21 2016 using texi2html 1.76.