mathematica里的Take[data[[4]],

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/10 07:15:25
mathematica里的Take[data[[4]],

mathematica里的Take[data[[4]],
mathematica里的Take[data[[4]],

mathematica里的Take[data[[4]],
给个更简单的理解吧
data = {1,2,3,4}
data[[4]]表示上面列表中的第四个=4,即是第四行,
如果4是一个集合,data]={1,2,3,{1,2,3,4,5,6,7,8,9,10,11,12}}
data[[4]]={1,2,3,4,5,6,7,8,9,10,11,12}
Take[data[[4]],11]={1,2,3,4,5,6,7,8,9,10,11}前11个

楼上有误,应该是得到:data矩阵中的第4行的前11个元素
下面是Take的函数说明,从帮助文档里面复制的
◼ Take[list, n] gives the first n elements of list.
◼ Take[list, -n] gives the last n elements of list.
◼ Take...

全部展开

楼上有误,应该是得到:data矩阵中的第4行的前11个元素
下面是Take的函数说明,从帮助文档里面复制的
◼ Take[list, n] gives the first n elements of list.
◼ Take[list, -n] gives the last n elements of list.
◼ Take[list, {m, n}] gives elements m through n of list.
◼ Take[list, {m, n, s}] gives elements m through n in steps of s.
◼ Take[list, seq_1, seq_2, … ] gives a nested list in which elements specified by seq_i are taken at level i in list.

收起

得到:data中的第4行前11列的元素。