Drop
Usage
• Drop[list, n]y给出丢掉它前 n 个元素后得到的 list.
• Drop[list, -n]y给出丢掉它后 n 个元素后得到的 list.
• Drop[list, n ] 给出丢掉它的 n 元素的 list.
• DrDrop[list, m, n ] 给出丢掉从 m 到 n 的元素后得到的 list.
• Drop[list, m, n, s ] 给出以步长 s丢掉从 m到 n 的元素后得到的 list.
• Drop[list, , , ... ] 给出一个嵌套列表,在该列表中由  指定的 list中 i 层上的元素已被丢掉.
Notes
• Drop 使用标准的序列指定.(参见 A.3.5节.) • Drop 可以被使用到一个具有任意头的对象上,而不必是List. • Drop[list, , ]能有效地丢掉除那些出现在 list子矩阵中元素外的所有元素.
Further Examples
Here is a list.
In[1]:=
|
This drops , the second element.
In[2]:=
|
Out[2]=
|
This drops , the third element from the end.
In[3]:=
|
Out[3]=
|
This drops , , , the third through fifth elements.
In[4]:=
|
Out[4]=
|
Here is a x matrix.
In[5]:=
|
In[6]:=
|
Out[6]//MatrixForm=
|
This drops row .
In[7]:=
|
Out[7]//MatrixForm=
|
This drops column .
In[8]:=
|
Out[8]//MatrixForm=
|
This drops row and column .
In[9]:=
|
Out[9]//MatrixForm=
|
In[10]:=
|
|