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

Online Help

All Products    Maple    MapleSim


SignalProcessing

  

Norm

  

compute the norm of an array of samples

  

NormDifference

  

compute the norm of the difference of arrays of samples

 

Calling Sequence

Parameters

Description

Thread Safety

Examples

Compatibility

Calling Sequence

Norm(A, p)

NormDifference(A, B, p)

Parameters

A, B

-

Arrays of real or complex numeric values; signals

p

-

(optional) infinity, 1 or 2; type of norm

Description

• 

The Norm(A, p) command returns the norm of the array V.

• 

The default value of p is infinity. In this case, the maximum of the absolute values of the elements of A is returned.

• 

If p is 1, then the L1 norm of A, defined as the sum of the absolute values of the elements of A, is returned.

• 

If p is 2, then the L2 norm of A is returned. This is defined by the following formula, with N being the number of elements in A.

k=1Nak2

• 

The NormDifference(A, B, p) command returns the norm of the difference of the arrays A and B, with p defined as above. A and B must have the same number of elements.

• 

Before the code performing the computation runs, Maple converts each input Array 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 the input Arrays have one of these datatypes beforehand.

Thread Safety

• 

The SignalProcessing[Norm] and SignalProcessing[NormDifference] commands are thread-safe as of Maple 17.

• 

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

Examples

withSignalProcessing:

aArray1,2,3,4,5,datatype=float8

a1.2.3.4.5.

(1)

Norma

5.

(2)

Norma,

5.

(3)

Norma,1

15.

(4)

Norma,2

7.41619848709566298

(5)

bArray5,4,3,2,1,datatype=float8

b5.4.3.2.1.

(6)

ab

−4.−2.0.2.4.

(7)

NormDifferencea,b

4.

(8)

NormDifferencea,b,

4.

(9)

NormDifferencea,b,1

12.

(10)

NormDifferencea,b,2

6.32455532033675905

(11)

Compatibility

• 

The SignalProcessing[Norm] and SignalProcessing[NormDifference] commands were introduced in Maple 17.

• 

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

See Also

Array

LinearAlgebra[VectorNorm]

with