VectorQ
Usage
• 如果expr是一个列表,它的元素没有一个是列表,给出True,否则给出False。
• 当被用于expr中的每个元素时,仅当 test 产生True时,VectorQ[expr, test]给出True。
Notes
• VectorQ[expr, NumberQ] 测试是否expr是一个数向量。
Further Examples
VectorQ[{a, b, c}] is considered to be a vector as long as none of the entries of the list are lists themselves.
In[1]:=
|
Out[1]=
|
In[2]:=
|
Out[2]=
|
In[3]:=
|
Out[3]=
|
In[4]:=
|
Out[4]=
|
|