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)