如何用mathematica求列表中前 n 大的元素

时间:2024-10-12 02:50:42

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

如何用mathematica求列表中前 n 大的元素

2、此时进入笔记本界面

如何用mathematica求列表中前 n 大的元素

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

如何用mathematica求列表中前 n 大的元素

4、求解前3大元素:在命令行中,输入TakeLargest[list, 3],然后按Enter+Shift

如何用mathematica求列表中前 n 大的元素

5、求解前5大元素:在命令行中,输入TakeLargest[list, 5],然后按Enter+Shift

如何用mathematica求列表中前 n 大的元素

6、求解前7大元素:在命令行中,输入TakeLargest[list, 7],然后按Enter+Shift

如何用mathematica求列表中前 n 大的元素
© 手抄报圈