Close
Close window
ArithmeticMean - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

StringTools

ArithmeticMean

compute the arithmetic mean of the characters (bytes) in a string

Calling Sequence

ArithmeticMean( s )

Parameters

s

-

Maple string

Description

The ArithmeticMean(s) command returns the arithmetic mean of the byte values of the characters present in the string s. The mean is computed as a floating-point number in hardware precision and is returned as a Maple float.

The arithmetic mean of a sufficiently long random string should be close to 128.

All of the StringTools package commands treat strings as (null-terminated) sequences of 8-bit (ASCII) characters. Thus, there is no support for multibyte character encodings, such as unicode encodings.

Examples

>

withStringTools:

>

mArithmeticMeancat

m104.

(1)
>

Charroundm

h

(2)
>

ArithmeticMeanRandom1000000

128.004748000000006

(3)


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /