"ComputedQuantity" (Interpreter Type)
Quantity derived by computation.
Details
- "ComputedQuantity" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "ComputedQuantity" requires connectivity to the Wolfram Cloud.
Allowed Forms
- Any natural-language quantity supported by "Quantity", or a computation yielding one.
Restriction Specifications
-
Restricted["ComputedQuantity",{{choices1,…}}] one among choices Restricted["ComputedQuantity",unit] convert to unit Restricted["ComputedQuantity",quantityvariable] restrict to units compatible with the physical quantity of quantityvariable Restricted["ComputedQuantity",unit,max] a quantity below Quantity[max,unit] Restricted["ComputedQuantity",unit,{min,max}] a quantity between Quantity[min,unit] and Quantity[max,unit] Restricted["ComputedQuantity",unit,{min,max,s}] a quantity between Quantity[min,unit] and Quantity[max,unit] with step s Restricted["ComputedQuantity",quantityvariable,max] a quantity below Quantity[max,unit], with unit the canonical unit of quantityvariable - The bounds min and max and step s can also be expressed as quantities.
Interpretation
- "ComputedQuantity" yields a Quantity.
Examples
Basic Examples (5)
Interpret quantities involving computations:
Computations with data are allowed:
Restrict and convert to a unit:
Restrict to a given physical quantity:
Accept unitless inputs in the presence of an appropriate restriction:
Attach the unit to the interpreted number: