Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Op Calculator

Op

Function: op (<expr>) Returns the main operator of the expression <expr>. op (<expr>) is equivalent to part (<expr>, 0).

expr: x . dx . dy + z . dy . dz + y . dx . dz;
expr2: x . [dx, dy] + z . [dy, dz] + y . [dx, dz];
expr3: x * [dx, dy] + z * [dy, dz] + y * [dx, dz];
expr4: [x, dx, dy] + [z, dy, dz] + [y, dx, dz];
expr5: [[x, dx, dy], [z, dy, dz], [y, dx, dz]];
expr6: x . del(x) . del(y) + z . del(y) . del(z) + y . del(x) . del(z);
part(expr, 1);
length(expr);
op(expr);
args(expr);
map(op, args(expr));
map(args, args(expr));
map(args, args(expr6));
diffform(vars, expr) := block(    [n, k],    0);
diff(x + y);

op returns a string if the main operator is a built-in or user-defined prefix, binary or n-ary infix, postfix, matchfix, or nofix operator. Otherwise, if <expr> is a subscripted function expression, op returns the subscripted function; in this case the return value is not an atom. Otherwise, <expr> is an array function or ordinary function expression, and op returns a symbol.

op observes the value of the global flag inflag.

op evaluates it argument.

See also args.

Examples:

          (%i1) stringdisp: true$
          (%i2) op (a * b * c);
          (%o2)                          "*"
          (%i3) op (a * b + c);
          (%o3)                          "+"
          (%i4) op (sin (a + b));
          (%o4)                          sin
          (%i5) op (a!);
          (%o5)                          "!"
          (%i6) op (-a);
          (%o6)                          "-"
          (%i7) op ([a, b, c]);
          (%o7)                          "["
          (%i8) op ((if a > b then c else d));
          (%o8)                         "if"
          (%i9) op (foo (a));
          (%o9)                          foo
          (%i10) prefix (foo);
          (%o10)                        "foo"
          (%i11) op (foo a);
          (%o11)                        "foo"
          (%i12) op (F [x, y] (a, b, c));
          (%o12)                        F
                                         x, y
          (%i13) op (G [u, v, w]);
          (%o13)                          G

There are also some inexact matches for op. Try ?? op to see them.

(%o1)                                true
(%i2) 

Op Example

Related Examples

op-part-sum

s: sum(a[i]*sum(b[i,j...

part(s,0);

part(s,1);

Calculate

op-part-sum

s: sum(a[i]*sum(b[i,j...

part(s,0);

part(s,1);

Calculate

op-part-sqrt

x:sqrt(1+cbrt(x+sqrt(...

part(x,0);

part(x,1);

Calculate

op-sin

op(sin(x+2));

Calculate

op-sin

f(x):=a*cos[((2*pi*t)...

Calculate

op-sqrt

op(sqrt(2));

op(2^(1/2));

Calculate

op-prefix-sin-stringdisp-true

stringdisp: true;

op (a * b * c);

op (a * b + c);

Calculate

op-sin

op(x+sin(x+2));

Calculate

op

op(x+2);

Calculate

op

op(a+b);

op(a*b);

op(a/b);

Calculate