UnitsP
UnitsP[q]⟹patt
returns a pattern that matches any quantity whose dimensions are compatible with the dimensions of q.
UnitsP[q,increment]⟹incPatt
returns a pattern that matches any quantity whose dimensions match those of q and is divisible by increment.
Details
Input
Output
Examples
Basic Examples (4)
Pattern that matches and quantity with Units or numeric value:
Pattern that matches anything whose unit dimensions match the dimensions of the given value:
Pattern that matches anything whose unit dimensions match the dimensions of the given unit:
Pattern that matches any quantity with specified dimensions: