Online Algebra Calculator
Many of users do not use powerful Maxima computer algebra system for systematic work, but for ad hoc algebraic calculations – equations, functions, matrixes, etc. only. To do this job, it is not useful to download the whole application from a web site.
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.
![Arrayinfo Example 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);](http://maxima-online.org//plot.html?g=i1840080917.png&t=img&db=r-1969482775)
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)