QuantityQ

Details

- QuantityQ[expr] returns False unless expr is a Quantity expression with valid arguments (i.e. has a canonical unit).
- QuantityQ[expr,dims] returns True if expr is a valid Quantity and is compatible with dims.
- Dimensional specification dims may be a list of unit dimensions, a QuantityVariable, a Quantity or a string representing a quantity variable or unit dimension.
Examples
open allclose allBasic Examples (2)
Scope (3)
Applications (1)
QuantityQ can be used in pattern tests for functions:

Properties & Relations (3)
QuantityQ returns False for any expression whose head is not Quantity:
In particular, QuantityArray, QuantityVariable, and QuantityDistribution are not QuantityQ objects:
QuantityQ returns False for Quantity expressions with invalid arguments:
QuantityQ returns True only for Quantity expressions with valid arguments:
Text
Wolfram Research (2012), QuantityQ, Wolfram Language function, https://reference.wolfram.com/language/ref/QuantityQ.html (updated 2024).
CMS
Wolfram Language. 2012. "QuantityQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/QuantityQ.html.
APA
Wolfram Language. (2012). QuantityQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/QuantityQ.html