KnownUnitQ

KnownUnitQ[expr]

returns True if expr is a canonical unit, and False otherwise.

Details

Examples

open allclose all

Basic Examples  (1)

Test whether an input expression is a canonical unit:

Scope  (6)

Units represented by a single string:

Products of known units:

KnownUnitQ returns True for valid IndependentUnit specifications:

It returns False for invalid IndependentUnit specifications:

MixedUnit specifications of compatible units:

Incompatible units do not produce a valid MixedUnit specification:

DatedUnit specifications:

Prefixes are dimensionless known units:

Properties & Relations  (2)

KnownUnitQ has attribute HoldAll:

A MixedUnit specification is valid if it contains compatible units:

Possible Issues  (1)

Quantity can interpret a non-canonical unit, converting it to its canonical form:

KnownUnitQ does not accept non-canonical units:

But it does accept their canonical form:

Wolfram Research (2012), KnownUnitQ, Wolfram Language function, https://reference.wolfram.com/language/ref/KnownUnitQ.html.

Text

Wolfram Research (2012), KnownUnitQ, Wolfram Language function, https://reference.wolfram.com/language/ref/KnownUnitQ.html.

CMS

Wolfram Language. 2012. "KnownUnitQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/KnownUnitQ.html.

APA

Wolfram Language. (2012). KnownUnitQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KnownUnitQ.html

BibTeX

@misc{reference.wolfram_2023_knownunitq, author="Wolfram Research", title="{KnownUnitQ}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/KnownUnitQ.html}", note=[Accessed: 18-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_knownunitq, organization={Wolfram Research}, title={KnownUnitQ}, year={2012}, url={https://reference.wolfram.com/language/ref/KnownUnitQ.html}, note=[Accessed: 18-March-2024 ]}