checkUnits
Check for compatible dimensions and consistent units
Description
C = checkUnits(
checks
expr
)expr
for compatible dimensions and consistent units and returns a
structure containing the fields Consistent
and
Compatible
. The fields contain logical 0
(false
) or logical 1
(true
)
depending on the check results.
expr
has compatible dimensions if all terms have the same
dimensions, such as length or time. expr
has consistent units if all
units of the same dimension can be converted to each other with a conversion factor of
1.
Examples
Input Arguments
Version History
Introduced in R2017a