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:

Create_list Calculator

Create_list

Function: create_list (<form>, <x_1>, <list_1>, ..., <x_n>, <list_n>) Create a list by evaluating <form> with <x_1> bound to each element of <list_1>, and for each such binding bind <x_2> to each element of <list_2>, .... The number of elements in the result will be the product of the number of elements in each list. Each variable <x_i> must actually be a symbol - it will not be evaluated. The list arguments will be evaluated once at the beginning of the iteration.

a[1]:1;
a[n]:=(2-a[n-1])/(3-a[n-1]);
create_list(ratsimp(a[k]),k,1,20)

          (%i1) create_list(x^i,i,[1,3,7]);
                           3   7
          (%o1)       [x, x , x ]

With a double iteration:

          (%i1) create_list([i,j],i,[a,b],j,[e,f,h]);
          (%o1) [[a, e], [a, f], [a, h], [b, e], [b, f], [b, h]]

Instead of <list_i> two args may be supplied each of which should evaluate to a number. These will be the inclusive lower and upper bounds for the iteration.

          (%i1) create_list([i,j],i,[1,2,3],j,1,i);
          (%o1) [[1, 1], [2, 1], [2, 2], [3, 1], [3, 2], [3, 3]]

Note that the limits or list for the j variable can depend on the current value of i.

(%o1)                                true
(%i2) 

Create_list Example

Related Examples

create_list-ratsimp

a[1]:1/4;

a[n]:=2/(2-a[n-1]);

create_list(ratsimp(a...

Calculate

create_list

x[i] :create_list(-6+...

Calculate

create_list-diff-ev-fpprintprec-ic1-numer-ode2-true

numer : true;

fpprintprec : 6;

f (x, y) := y-5*x^2;

Calculate

create_list-ev-float-length-load-matrix-plot2d
plot2d([[discrete,p],y(x)],[x,1,5],[style,points,lines],[point_type,asterisk]);

M:matrix([1,2],[2,3],...

load(lsquares);

L:lsquares_estimates(...

Calculate

create_list-sin

f(x):=sin(x);

x[i] :create_list( −6...

y[i] :create_list(f(x...

Calculate

create_list

f:[[1,2],[1,3],[2,4]];

g:[[2,a],[3,c],[4,d]];

create_list([i,j], i,...

Calculate

create_list-diff-ev-fpprintprec-ic1-numer-ode2-true

numer : true;

fpprintprec : 6;

f (x, y) := y-5*x^2;

Calculate

create_list

create_list(2^i-1, i,...

Calculate