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

Online Help

All Products    Maple    MapleSim


SignalProcessing

  

Mean

  

compute the mean of an array of samples

  

StandardDeviation

  

compute the standard deviation of an array of samples

  

MeanStandardDeviation

  

compute, simultaneously, the mean and standard deviation of an array of samples

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Mean(A)

Mean(A, W)

StandardDeviation(B)

MeanStandardDeviation(B)

Parameters

A

-

Array of real or complex numeric values; the signal

B

-

Array of real numeric values; the signal

W

-

Array of real numeric values; the weights

Description

• 

The Mean(A) command returns the mean of the Array A, defined as

MeanA=k=1NAkN

  

where N is the number of elements of A. When an Array W for weights of size N is provided, the mean is defined instead as

MeanA,W=k=1NAkWkk=1NWk

  

with MeanA,W=MeanA when Wk=1N.

• 

The StandardDeviation(B) command returns the standard deviation of the Array B, defined as

StandardDeviationB=k=1NBkμ2N1

  

where N is the number of elements of B, and μ is the mean of B.

• 

The MeanStandardDeviation(B) command computes the mean and standard deviation of B simultaneously, and returns an expression sequence consisting of these values, respectively.

• 

The Mean, StandardDeviation, and MeanStandardDeviation commands also accept lists and other types of rtables, both one-dimensional and multi-dimensional, which are then converted to 1-D Arrays.

• 

For all of these commands, Maple may convert the input signal. Before the code performing Mean runs, Maple converts A to a hardware datatype, first attempting float[8] and subsequently complex[8], unless it already has one of these datatypes. Similarly, before the code performing StandardDeviation or MeanStandardDeviation runs, B is converted to datatype float[8] if it does not have that datatype already. For this reason, it is most efficient if the input Array has an appropriate datatype already.

The MeanStandardDeviation command is not thread safe.

Examples

withSignalProcessing:

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

a1.2.3.4.5.

(1)

Meana

3.

(2)

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

w5.4.3.2.1.

(3)

Meana,w

2.33333333333333348

(4)

StandardDeviationa

1.58113883008418976

(5)

MeanStandardDeviationa

3.,1.58113883008418976

(6)

Compatibility

• 

The SignalProcessing[Mean], SignalProcessing[StandardDeviation] and SignalProcessing[MeanStandardDeviation] commands were introduced in Maple 17.

• 

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

• 

The SignalProcessing[Mean], SignalProcessing[StandardDeviation] and SignalProcessing[MeanStandardDeviation] commands were updated in Maple 2021.

See Also

Array

SignalProcessing[Sum]

with