Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

CompatibleUnitQ

CompatibleUnitQ[quantity1,quantity2]
tests whether and have compatible units.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Test whether a sequence of quantities is compatible:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

If non-Quantity elements are present, CompatibleUnitQ returns false:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2012
(9.0)