jed-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: howto concat arrays


Klaus Schmid <klaus.schmid@xxxxxx> wrote:
>How can two 1-D-arrays be concatenated?
>
>Is it possible, that [a1,a2] returns a 2-D-array, if length(a1) ==
>length(a2)?

Versions of slang _prior_ to 1.4.6 allowed one to create 2-d arrays in
this manner if the dimensions of the arrays allow it, otherwise the
arrays were concatenated.  The idea was that, e.g.,

   [[1,2,3],
    [4,5,6]]

would be a convenient way to produce a 2x3 array.  Since there is an
ambiguity in this approach, versions of slang _after_ 1.4.6 simply
concatenate the arrays to produce a 1-d array.   

--John

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]