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:

Setify Calculator

Setify

Function: setify (<a>) Constructs a set from the elements of the list <a>. Duplicate elements of the list <a> are deleted and the elements are sorted according to the predicate orderlessp.

:lisp (lisp-implementation-type);
:lisp (lisp-implementation-version);
prime(z):=block([k:z, y:1],     (y:listify(setify(append(makelist(if(primep(k)) then k else 1, k, 1, k), [y])))),    return(y));
prime(10);
primes_between(m,z):=block([k:z, y:1, l:m],     (y:listify(setify(append(makelist(if(primep(k)) then k else 1, k, l, k), [y])))),    return(y));
primes_between(10, 20);

setify complains if <a> is not a literal list.

Examples:

          (%i1) setify ([1, 2, 3, a, b, c]);
          (%o1)                  {1, 2, 3, a, b, c}
          (%i2) setify ([a, b, c, a, b, c]);
          (%o2)                       {a, b, c}
          (%i3) setify ([7, 13, 11, 1, 3, 9, 5]);
          (%o3)                {1, 3, 5, 7, 9, 11, 13}

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

(%o1)                                true
(%i2) 

Setify Example

Related Examples

setify-solve

setify(solve(2*x-5=0));

setify(solve(x*2-5=0));

Calculate

setify-solve

setify(solve(2*x-5=0));

Calculate

setify

setify([1,-1,2,2,3,-3]);

Calculate

setify-solve

setify(solve(2*x-5=0));

setify(solve(x*2-5=0));

Calculate

setify

setify([1,-1,2,2,3,-3]);

Calculate

setify

setify([1,-1,2,2,3,-3]);

Calculate

setify-solve

setify(solve(2*x-5=0));

setify(solve(x*2-5=0));

Calculate

setify

D1:[[1, 5], [5, 1], [...

S1:setify(D1);

Calculate

setify

setify([1,2,4]);

Calculate

setify

setify([1,2,1,2,3,2,3]);

Calculate