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:

Length

Function: length (<expr>) Returns (by default) the number of parts in the external (displayed) form of <expr>. For lists this is the number of elements, for matrices it is the number of rows, and for sums it is the number of terms (see dispform).

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);

The length command is affected by the inflag switch. So, e.g. length(a/(b*c)); gives 2 if inflag is false (Assuming exptdispflag is true), but 3 if inflag is true (the internal representation is essentially a*b^-1*c^-1).

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

(%o1)                                true
(%i2) 

Related Examples

length-map-realroots-solve

f: -18*x^2-50=60*x;

solutions: solve(f);

xvals: map(rhs,soluti...

Calculate

length-map-realroots-solve

f: -18*x^2-50=60*x;

solutions: solve(f);

xvals: map(rhs,soluti...

Calculate

length-map-realroots-solve

xvals: map(rhs,solve(...

for i:1 while i<=(...

Calculate

length-makelist-primep

a: [2,3,5,7,11,13,17,...

b: makelist(primep(a[...

Calculate

length-map-realroots-solve

solutions: solve(2*x^...

xvals: map(rhs,soluti...

xvals[1];

Calculate

length-map-realroots-solve

solutions: solve(-x^2...

xvals: map(rhs,soluti...

xvals[1];

Calculate

length-map-realroots-solve

solve(-18*x^2-50=600*...

solve(-18*x^2-50=600*...

xvals: map(rhs,solve(...

Calculate

length-makelist-primep

a: [2,3,5,7,11,13,17,...

b: makelist(primep(a[...

Calculate