如何使用mathematica对列表中的元素进行分类

时间:2024-10-12 11:41:28

1、打开mathematica11,点击【新建笔记本】

如何使用mathematica对列表中的元素进行分类

2、此时进入笔记本界面

如何使用mathematica对列表中的元素进行分类

3、在命令行中,输入list = {3, 2, 1, 190, 8, 4, 67, 89, 81},然后按Enter+Shift

如何使用mathematica对列表中的元素进行分类

4、在命令行中,输入FindClusters[list],然后按Enter+Shift

如何使用mathematica对列表中的元素进行分类

5、指定分成2类:在命令行中,输入FindClusters[list,2],然后按Enter+Shift

如何使用mathematica对列表中的元素进行分类

6、指定分成4类:在命令行中,输入FindClusters[list,4],然后按Enter+Shift

如何使用mathematica对列表中的元素进行分类
© 手抄报圈