Sponsored links: Algebra eBooks
 

Related

make_array

Run Example
(%i1)arraymake (a, [1]);
(%o1)                                 a
                                       1
(%i2)  arraymake (a, [k]);
(%o2)                                 a
                                       k
(%i3)  arraymake (a, [i, j, 3]);
(%o3)                              a
                                    i, j, 3
(%i4)  array (a, fixnum, 10);
(%o4)                                  a
(%i5)  fillarray (a, makelist (i^2, i, 1, 11));
(%o5)                                  a
(%i6)  arraymake (a, [5]);
(%o6)                                 a
                                       5
(%i7)  ''%;
(%o7)             (%i8)  l : [a, b, c, d, e];
(%o8)                           [a, b, c, d, e]
(%i9)  arraymake ('l, [n]);
(%o9)                                 l
                                       n
(%i10)  ''%, n = 3;
(%o10)            (%i11)  a2 : make_array (fixnum, 10);
(%o11)                 {Array:  #(0 0 0 0 0 0 0 0 0 0)}
(%i12)  fillarray (a2, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
(%o12)                 {Array:  #(1 2 3 4 5 6 7 8 9 10)}
(%i13)  arraymake ('a2, [8]);
(%o13)                                a2
                                        8
(%i14)  ''%;
(%o14)            
Run Example
debugmode(true);
(%o1)                                true
(%i2) tekst:"ALA";
(%o2)                                 ALA
(%i3) code:[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p];
(%o3)          [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p]
(%i4) characters:charlist(tekst);
(%o4)                              [A, L, A]
(%i5) out:make_array(any,slength(tekst));
(%o5)                      {Array:  #(NIL NIL NIL)}
(%i6) for i:1 while i <
= slength(tekst) do( out[i-1]:code[cint(characters[i])-64]);
(%o6)                                done
(%i7) listarray(out);
(%o7)                              [a, l, a]
(%i8) 
Run Example
array (aa, 5, 7);
(%o1)                                 aa
(%i2)  bb [foo] : (a + b)^2;
                                          2
(%o2)                              (b + a)
(%i3)  cc [x] := x/100;
                                          x
(%o3)                             cc  := ---
                                    x    100
(%i4)  dd : make_array ('any, 7);
(%o4)              {Array:  #(NIL NIL NIL NIL NIL NIL NIL)}
(%i5)  arrays;
(%o5)                            [aa, bb, cc]
(%i6) 

Related Help

Help for Make_array