Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Expressions > Testing Expressions >
Mathematica > Core Language > Procedural Programming > Conditionals > Testing Expressions >

VectorQ

VectorQ[expr]
gives True if expr is a list or a one-dimensional SparseArray object, none of whose elements are themselves lists, and gives False otherwise.
VectorQ[expr, test]
gives True only if test yields True when applied to each of the elements in expr.
Test whether an object is a vector:
These are not vectors:
Use specific tests to generalize or specialize:
Test for a vector of integers:
Test for a vector of machine-real numbers:
Test for a vector of real-valued numeric quantities:
Faster test for explicit real-valued numbers:
Define a function that only evaluates for vector arguments:
Numerically find the minimum of the functions with n components:
VectorQ is a special case of ArrayQ:
A function equivalent to VectorQ:
New in 1 | Last modified in 5
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team