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

N: [10, 1,2,3];
p(x,n):=x/n;
total(x):=sum(x[i],i,1,length(x));
logN(n,x):=log(x)/log(n);
I(A):=-sum(p(A[i],total(A))*logN(length(A),p(A[i],total(A))), i, 1, length(A));
bfloat(I(N));

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-matrix

e:matrix([]);

e;

length(e);

Calculate

length-map-realroots-solve-tex

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

solutions: solve(f);

xvals: map(rhs,soluti...

Calculate

length-load-var

load(descriptive);

load(numericalio);

s:[1,2,2,7,8,11,68,35...

Calculate

length-next_prime-rest

a : 1;

for i thru 10 do prin...

prim : primes (0, 50);

Calculate

length-load-sqrt-sum

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

load(descriptive);

gruppierung:discrete_...

Calculate

length-sum

x:[1000,1200,800,500,...

n:length(x);

N:sum(x[i],i,1,n);

Calculate

length-print-split

answer: "x=1";

eq: split(answer,"or");

print(eq[1]);

Calculate

length-solve-sum

Aufgabe:"Seite 299 un...

x:[1,2,3,4,5];

y:[11,21,31,41,51];

Calculate

length-plot2d-solve-sum
plot2d([discrete,x,y]);

x:[-2,-1,1,2,3];

y:[-2,0,1,3,4];

n:length(x);

Calculate

length-load

load("vect");

E1:[1,2,3];

E2:[2,3,1];

Calculate