Insert - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

SignalProcessing

  

Insert

  

insert 1-D rtable into another 1-D rtable

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Insert( A, k, B, options )

Parameters

A, B

-

1-D rtables or lists with entries of type complexcons

k

-

integer; specifies the index of A where B is to be inserted

inplace

-

(optional) Either true or false, specifies if the insertion of B into A at k is to be performed in-place.

Description

• 

The Insert command inserts 1-D rtable or list B into 1-D rtable or list A at index k, and returns the combined container.

• 

When A is an rtable, the rtable order and subtype of the output are the same as for A. When A is a list, on the other hand, the output is an Array having Fortran order.

• 

Any passed rtables must have no indexing function, and use rectangular storage.

• 

Suppose , , and  has dimensions . The result of  contains  elements, with  inserted to the left of element . When  is an Array with initial index different than , the insertion index  must satisfy  and . When  is a Vector or an Array with initial index , on the other hand, the insertion index must satisfy  and , with  corresponding to element .

• 

The extreme case  corresponds to inserting  before , and  corresponds to inserting  after .

• 

Internally, A and B will both be converted to float[8] Vectors, if possible. If this is not possible, they will both be converted to complex[8] Vectors, if possible. For this reason, it is more efficient for the passed containers A and B to both be 1-D rtables of the same double precision hardware float datatype (float[8] or complex[8]).

• 

Suppose inplace=true. The container A must have either float[8] or complex[8] datatype, and the container B must be coercible to the same datatype. Moreover, if B is an alias of A, or A and B are both aliases of the same rtable, then a copy of B is created in order to avoid complications during insertion.

• 

The Insert command is not thread safe.

Examples

Example 1

(1)

(2)

(3)

(4)

(5)

Example 2

(6)

(7)

(8)

Example 3

(9)

(10)

(11)

Example 4

Example 5

(12)

(13)

memory used=2.57MiB, alloc change=2.55MiB, cpu time=2.00ms, real time=2.00ms, gc time=0ns

Compatibility

• 

The SignalProcessing[Insert] command was introduced in Maple 2022.

• 

For more information on Maple 2022 changes, see Updates in Maple 2022.

See Also

ArrayTools[Copy]

ArrayTools[Extend]

ArrayTools[Insert]

SignalProcessing

 


Download Help Document