Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/Arrays/Maxima/arrays.maxima
Normal file
25
Task/Arrays/Maxima/arrays.maxima
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* Declare an array, subscripts run from 0 to max value */
|
||||
array(a, flonum, 20, 20, 3)$
|
||||
|
||||
arrayinfo(a);
|
||||
/* [complete, 3, [20, 20, 3]] */
|
||||
|
||||
a[0, 0]: 1.0;
|
||||
|
||||
listarray(a);
|
||||
/* [1.0, 0.0, 0.0, ..., 0.0] */
|
||||
|
||||
/* Show all declared arrays */
|
||||
arrays;
|
||||
/* [a] */
|
||||
|
||||
|
||||
/* One may also use an array without declaring it, it's a hashed array */
|
||||
b[1]: 1000;
|
||||
b['x]: 3/4; /* hashed array may have any subscript */
|
||||
|
||||
arrayinfo(b);
|
||||
/* [hashed, 1, [1], [x]] */
|
||||
|
||||
listarray(b);
|
||||
/* [1000, 3/4] */
|
||||
Loading…
Add table
Add a link
Reference in a new issue