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:

Arrayinfo Calculator

Arrayinfo

Function: arrayinfo (<A>) Returns information about the array <A>. The argument <A> may be a declared array, an undeclared (hashed) array, an array function, or a subscripted function.

array(P, 4, 3);
fillarray(P,           [0.02, 0.08, 0.03, 0.04,            0.05, 0.10, 0.02, 0.07,            0.20, 0.04, 0.20, 0.15]);
arrayinfo(P);

For declared arrays, arrayinfo returns a list comprising the atom declared, the number of dimensions, and the size of each dimension. The elements of the array, both bound and unbound, are returned by listarray.

For undeclared arrays (hashed arrays), arrayinfo returns a list comprising the atom hashed, the number of subscripts, and the subscripts of every element which has a value. The values are returned by listarray.

For array functions, arrayinfo returns a list comprising the atom hashed, the number of subscripts, and any subscript values for which there are stored function values. The stored function values are returned by listarray.

For subscripted functions, arrayinfo returns a list comprising the atom hashed, the number of subscripts, and any subscript values for which there are lambda expressions. The lambda expressions are returned by listarray.

Examples:

arrayinfo and listarray applied to a declared array.

          (%i1) array (aa, 2, 3);
          (%o1)                          aa
          (%i2) aa [2, 3] : %pi;
          (%o2)                          %pi
          (%i3) aa [1, 2] : %e;
          (%o3)                          %e
          (%i4) arrayinfo (aa);
          (%o4)                 [declared, 2, [2, 3]]
          (%i5) listarray (aa);
          (%o5) [#####, #####, #####, #####, #####, #####, %e, #####,
                                                  #####, #####, #####, %pi]

arrayinfo and listarray applied to an undeclared (hashed) array.

          (%i1) bb [FOO] : (a + b)^2;
                                             2
          (%o1)                       (b + a)
          (%i2) bb [BAR] : (c - d)^3;
                                             3
          (%o2)                       (c - d)
          (%i3) arrayinfo (bb);
          (%o3)               [hashed, 1, [BAR], [FOO]]
          (%i4) listarray (bb);
                                        3         2
          (%o4)                 [(c - d) , (b + a) ]

arrayinfo and listarray applied to an array function.

          (%i1) cc [x, y] := y / x;
                                               y
          (%o1)                      cc     := -
                                       x, y    x
          (%i2) cc [u, v];
                                          v
          (%o2)                           -
                                          u
          (%i3) cc [4, z];
                                          z
          (%o3)                           -
                                          4
          (%i4) arrayinfo (cc);
          (%o4)              [hashed, 2, [4, z], [u, v]]
          (%i5) listarray (cc);
                                        z  v
          (%o5)                        [-, -]
                                        4  u

arrayinfo and listarray applied to a subscripted function.

          (%i1) dd [x] (y) := y ^ x;
                                               x
          (%o1)                     dd (y) := y
                                      x
          (%i2) dd [a + b];
                                              b + a
          (%o2)                  lambda([y], y     )
          (%i3) dd [v - u];
                                              v - u
          (%o3)                  lambda([y], y     )
          (%i4) arrayinfo (dd);
          (%o4)             [hashed, 1, [b + a], [v - u]]
          (%i5) listarray (dd);
                                   b + a                v - u
          (%o5)      [lambda([y], y     ), lambda([y], y     )]

(%o1)                                true
(%i2) 

Arrayinfo Example

Related Examples

arrayinfo

? arrayinfo;

Calculate

arrayinfo-charlist-kill-listarray-map-print-rest

kill(i,v,k,a,b,c);

m:charlist("ghthrt yh...

f(c):=if alphacharp(c...

Calculate

arrayinfo-load

load(worldmap) ;

arrayinfo(boundaries_...

Calculate

arrayinfo-christof-load-matrix-sin

load(ctensor);

ct_coords:[t,r,theta,...

lg:matrix([-1,0,0,0],...

Calculate

arrayinfo

? arrayinfo;

Calculate

arrayinfo-charlist-kill-listarray-map-print-rest

kill(i,v,k,a,b,c);

m:charlist("ghthrt yh...

f(c):=if alphacharp(c...

Calculate

arrayinfo-load

load(worldmap) ;

arrayinfo(boundaries_...

Calculate

arrayinfo-christof-load-matrix-sin

load(ctensor);

ct_coords:[t,r,theta,...

lg:matrix([-1,0,0,0],...

Calculate