SignalProcessing - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : Signal Processing : Transforms : SignalProcessing/DCT

SignalProcessing

  

DCT

  

compute forward discrete cosine transform

  

InverseDCT

  

compute inverse discrete cosine transform

 

Calling Sequence

Parameters

Options

Description

Thread Safety

Examples

Compatibility

Calling Sequence

DCT(A)

InverseDCT(A)

Parameters

A

-

Array of real numeric values; the signal

Options

• 

container : Array, predefined Array for holding results

• 

inplace   : boolean, specifies that output should overwrite input

Description

• 

The DCT(A) command computes the discrete cosine transform (DCT) of the Array A and returns the result in an Array with datatype float[8].

• 

The InverseDCT(A) command computes the inverse discrete cosine transform of the Array A and returns the result in an Array with datatype float[8].

• 

Before the code performing the computation runs, A is converted to datatype float[8] if it does not have that datatype already. For this reason, it is most efficient if A has this datatype beforehand.

• 

The discrete cosine transform B of a sample of N elements is defined by the formula

Bk=Cki=0N1Aicos2i+1πk2N

  

where C is given by

Ck=1Nk=02N0<k

  

.

• 

Samples may be of arbitrary length, but when the length is a power of 2, a faster algorithm is used,

• 

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 having datatype float[8] and size equal to those of A.

• 

If the inplace or inplace=true option is provided, then A is overwritten with the results. In this case, the container option is ignored. Furthermore, A must have datatype float[8].

Thread Safety

• 

The SignalProcessing[DCT] and SignalProcessing[InverseDCT] commands are thread-safe as of Maple 17.

• 

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

Examples

withSignalProcessing&colon;

withplots&colon;

N10&colon;

AGenerateToneN&comma;1&comma;0.1&comma;0&plus;GenerateToneN&comma;3&comma;0.4&comma;0.2&colon;

BDCTA

B8.4260003245840810-161.840815074937472.126627020880101.073405226325217.9441092903912710-161.867449343544571.7874245903380410-154.532017760897833.299114750275032.45478072804124

(1)

displaylistplotA&comma;&apos;title&apos;&equals;Signal&comma;listplotB&comma;&apos;title&apos;&equals;Cosine Transform

CInverseDCTB

C3.940199733523731.919979265074891.784425963812390.03271740521865412.837363837479881.940199733523733.538013253824791.166391975062490.6507513939685531.21932984872999

(2)

mapfnormal&comma;AC

0.0.0.0.0.0.0.0.0.0.

(3)

AGenerateJaehne10&comma;3

A0.0.4693033951206931.763355756877422.963065021785411.763355756877422.121320343559641.763355756877422.963065021785411.763355756877420.469303395120694

(4)

CArray1..10&comma;&apos;datatype&apos;&equals;&apos;float&apos;8&colon;

DCTA&comma;&apos;container&apos;&equals;C

1.500000000000001.534351019701630.3036659479510252.527830900947472.060398975627682.248013729607341.278120429826722.678116209588312.163239928271291.03295888501124

(5)

C

1.500000000000001.534351019701630.3036659479510252.527830900947472.060398975627682.248013729607341.278120429826722.678116209588312.163239928271291.03295888501124

(6)

InverseDCTC&comma;&apos;inplace&apos;

5.5511151231257810-170.4693033951206931.763355756877422.963065021785411.763355756877422.121320343559641.763355756877422.963065021785411.763355756877420.469303395120694

(7)

C

5.5511151231257810-170.4693033951206931.763355756877422.963065021785411.763355756877422.121320343559641.763355756877422.963065021785411.763355756877420.469303395120694

(8)

mapfnormal&comma;AC

0.0.0.0.0.0.0.0.0.0.

(9)

Compatibility

• 

The SignalProcessing[DCT] and SignalProcessing[InverseDCT] commands were introduced in Maple 17.

• 

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

See Also

SignalProcessing[DFT]

SignalProcessing[DWT]

SignalProcessing[FFT]

 


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