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

Online Help

All Products    Maple    MapleSim


SignalProcessing

  

UpSample

  

up-sample a signal

 

Calling Sequence

Parameters

Options

Description

Thread Safety

Examples

Compatibility

Calling Sequence

UpSample( A, factor, phase )

Parameters

A

-

Array of real or complex numeric values; the signal

factor

-

posint, up-sample factor

phase

-

nonnegint, (optional) phase

Options

• 

container : Array, predefined Array for holding results

Description

• 

The UpSample( A, factor, phase ) command up-samples the signal in the Array A.

• 

The effect of this command is to place factor - 1 zeroes between each pair of samples in the Array A.

• 

Before the code performing the computation runs, Maple converts A to a hardware datatype, first attempting float[8] and subsequently complex[8], unless it already has one of these datatypes. For this reason, it is most efficient if A has one of these datatypes beforehand.

• 

The phase argument determines an offset, so that the sample value from A occurs phase positions offset in the output array. The value of phase must be non-negative and less than the value of factor.

• 

If the container=C option is provided, then the results are put into C and C is returned. With this option, no additional memory is allocated to store the result. The container must be an Array of size N * factor, where N is the number of elements of A, and it must have datatype float[8] if A is real and complex[8] if A is complex.

Thread Safety

• 

The SignalProcessing[UpSample] command is thread-safe as of Maple 17.

• 

For more information on thread safety, see index/threadsafe.

Examples

withSignalProcessing:

interface'rtablesize'=20:

AArray1,2,3,4,5,6,'datatype'='float'8

1.02.03.04.05.06.0

(1)

UpSampleA,1

1.02.03.04.05.06.0

(2)

UpSampleA,2

1.00.02.00.03.00.04.00.05.00.06.00.0

(3)

UpSampleA,3

1.00.00.02.00.00.03.00.00.04.00.00.05.00.00.06.00.00.0

(4)

UpSampleA,3,0

1.00.00.02.00.00.03.00.00.04.00.00.05.00.00.06.00.00.0

(5)

UpSampleA,3,1

0.01.00.00.02.00.00.03.00.00.04.00.00.05.00.00.06.00.0

(6)

UpSampleA,3,2

0.00.01.00.00.02.00.00.03.00.00.04.00.00.05.00.00.06.0

(7)

CArray1..18,'datatype'='float'8:

UpSampleA,3,'container'=C

1.00.00.02.00.00.03.00.00.04.00.00.05.00.00.06.00.00.0

(8)

C

1.00.00.02.00.00.03.00.00.04.00.00.05.00.00.06.00.00.0

(9)

AArrayI,I,1+I,I1,datatype=complex8

0.0+1.0I0.01.0I1.0+1.0I1.0+1.0I

(10)

CArray1..8,'datatype'='complex'8:

UpSampleA,2,1,'container'=C

0.0+0.0I0.0+1.0I0.0+0.0I0.01.0I0.0+0.0I1.0+1.0I0.0+0.0I1.0+1.0I

(11)

C

0.0+0.0I0.0+1.0I0.0+0.0I0.01.0I0.0+0.0I1.0+1.0I0.0+0.0I1.0+1.0I

(12)

Compatibility

• 

The SignalProcessing[UpSample] command was introduced in Maple 17.

• 

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

See Also

DownSample