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

numer:true;
x:[166,187,169,191,175,161,176,170,195,197,187,168,171,161,173];
n:length(x);
m:1/n*sum(x[i],i,1,n);
v:1/n*sum((x[i]-m)^2,i,1,n);
s:sqrt(v);
display(m,v,s);

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

N: [10, 3, 1];

p(x,n):=x/n;

total(x):=sum(x[i],i,...

Calculate

length-makelist-map-powerset-setify-sort-sqrt

Dreieck:[[[1, 5], [5,...

n:length(Dreieck);

f(x):=setify(Dreieck[...

Calculate

length-makelist

makelist(2*i,i,1,3).l...

Calculate

length-numer-solve-sum

x:[-2.66,1.12,2.76,5....

y:[-2.46,-0.74,2....

n:length(x);

Calculate

length-numer-sum

s:[3,4,3,5];

n:length(s);

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

Calculate

length-sum

N: [10, 3, 1];

p(x,n):=x/n;

Total:sum(N[i],i,1,le...

Calculate

length-print-split

answer: "x=1 or x=2";

eq: split(answer,"or");

print(eq[1]);

Calculate

length-sqrt-sum

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

norm([1,1,1]);

Calculate

length

length(a[1]);

Calculate

length-or

length:(not A3 and A0...

length,A3 = false, A2...

Calculate