WLJS LogoWLJS Notebook

CompatibleUnitQ

CompatibleUnitQ[quantity1, quantity2] returns True if quantity1 and quantity2 have compatible units, and False otherwise.

Examples

CompatibleUnitQ[Quantity[1, "Meters"], Quantity[1, "Feet"]]
(* True *)
CompatibleUnitQ[Quantity[1, "Meters"], Quantity[1, "Seconds"]]
(* False *)

Please visit the official Wolfram Language Reference for more details.

On this page