Quantity
Quantity[magnitude,unit]
represents a quantity with size magnitude and unit specified by unit.
Quantity[unit]
assumes the magnitude of the specified unit to be 1.
Details and Options
- Quantity has attribute HoldRest and preserves the structure of unit.
- The specified unit should be a string or operation of strings representing the Quantity expression's unit value.
- Quantity[unit] will produce a canonicalized Quantity with a magnitude of 1.
- Quantity expressions can be created by using the
free-form linguistics interface. - Quantity will automatically attempt to parse an unknown unit string to its canonical form.
- Supported units include all those specified by NIST Special Publication 811.
- For purely numeric units, such as percents, Normal[expr] converts a Quantity object to an ordinary number.
Examples
open allclose allBasic Examples (4)
A Quantity represents a value associated with a specific unit:
Use
to enter quantities and units:
Compound unit expressions can also be found using
:
A unit can be a string or a product of strings:
Valid unit specifications include a number of physical constants:
Quantity will automatically attempt to interpret an unknown unit string:
Scope (6)
Applications (2)
Properties & Relations (12)
Possible Issues (2)
See Also
QuantityUnit QuantityMagnitude UnitConvert CompatibleUnitQ QuantityQ MixedMagnitude MixedUnit QuantityDistribution EntityCopies QuantityVariable Inline Free-form Input
Tutorials
Related Guides
Related Links
Introduced in 2012
(9.0)
| Updated in 2014 (10.0)