extend an Array with additional elements - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Low-level Manipulation : Matrices, Vectors, and Arrays : ArrayTools : ArrayTools/Extend

ArrayTools[Extend] - extend an Array with additional elements

Calling Sequence

Extend(A,B,inplace)

Parameters

A

-

: Array or Vector

B

-

: list, Array, or Vector, elements to append to A

opts

-

: (optional) inplace=true or inplace=false

Description

• 

The Extend(A,B) command extends the Vector or the 1-D Array, A, by the elements in B.

• 

When inplace=false is specified, Extend allocates a new Array and does not modify the existing one.  Otherwise, the existing object is modified.

• 

This function is part of the ArrayTools package, so it can be used in the short form Extend(..) only after executing the command with(ArrayTools. However, it can always be accessed through the long form of the command by using ArrayTools[Extend](..).

Examples

withArrayTools:

A:=Array1,2,3

A:=123

(1)

ExtendA,4,5

12345

(2)

B:=sinx,cosx

B:=sinxcosx

(3)

ExtendA,B

12345sinxcosx

(4)

v:=Vectorrow75,46,32,73,46:

Extendv,32,66,111,115,inplace=false

75463273463266111115

(5)

v

7546327346

(6)

See Also

ArrayTools, ArrayTools[Append], ArrayTools[Concatenate]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam