The Maxima on-line user's manual

Algebra Calculator

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`).

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-numer-sum

X:[3,2,4,3,2,5,1,2,5,...

n:length(X);

m:n/(sum((1/X[i]),i,1...

Calculate

Urliste:[ [w,...

length(Urliste);

Calculate

length-numer-pi-plot2d-sqrt-tan

g:32;

slope:tan(74/180*%pi)...

height:8+1/12-1;

Calculate

length-solve

f(x,y) := x[1]*y[1] +...

a1 : [-5,-1,-5,5];

a2 : [4,5,2,4];

Calculate

length-not-or-part-reveal

((reveal(part((not(L(...

Calculate

length

X:[3,2,4,3,2,5,1,2,5,...

n:length(X);

m:(prod(X[i],i,1,n))^...

Calculate

length-solve-sqrt

eq1:[3,5].[x1,x2] = 131;

eq2:length([x1,x2]) =...

solve([eq1,eq2],[x1,x...

Calculate

length-sqrt-sum

norm(x):=sqrt(sum(x[i...

Calculate

length-makelist-reverse

"*"/* Eine Polynomfun...

"*"/* Eingabe der Pun...

Punkt:[[-4,0],[-1,-3]...

Calculate