计数

计数[列表]

计算中的元素列表,列出所有不同的元素及其多重性。

计数[列表,测试]

使用测试以确定是否应将元素对视为等价,并给出每个等价类的第一个代表及其重数的列表。

细节

示例

全部打开全部关闭

基本示例  (2)

获取符号列表的计数:

计算列表中具有相同标题的元素:

范围  (3)

结果将按列表中第一次出现的顺序返回:

统计随机生成的整数的实例:

列表元素可以是任何表达式:

应用  (1)

统计字符串中出现的字符数:

属性和关系  (5)

频率最高的元件如下所示最常见的:

A已排序计数相当于工会:

计数是的离散模拟二进制计数:

计数[列表]返回一个关联,其中的值是其键的计数:

使用的第二个参数计数构造其相应的by-function:

统计列表中的奇数和偶数:

Wolfram Research(2007),Tally,Wolfram语言函数,https://reference.wolfram.com/language/ref/Tally.html。

文本

Wolfram Research(2007),Tally,Wolfram语言函数,https://reference.wolfram.com/language/ref/Tally.html。

CMS公司

沃尔夫拉姆语言。2007年,《理货》,Wolfram语言与系统文档中心。Wolfram研究。https://reference.wolfram.com/language/ref/Tally.html。

亚太地区

沃尔夫拉姆语言。(2007). 计数。Wolfram语言与系统文档中心。检索自https://reference.wolfram.com/language/ref/Tally.html

BibTeX公司

@misc{reference.wolfram_2024_tally,author=“wolfram Research”,title=“{tally}”,year=“2007”,howpublished=“\url{https://reference.jolfram.com/language/ref/tally.html}”]}

BibLaTeX公司

@online{reference.wolfram_2024_tally,organization={wolfram Research},title={tally},year={2007},url={https://reference.jolfram.com/language/ref/tally.html},note=[访问时间:2024年9月21日]}