MathTop

index_of_coincidence 函数

返回从字符串中抽取两个不同位置时字符相同的概率。

语法

  • IndexOfCoincidence(text)
  • index_of_coincidence(text)

参数与选项

text文本值,通常写在引号中。

示例

  1. 重合指数IndexOfCoincidence('ABAB')返回 0.333333333333。