ecl-logo Documentation

Convert

Convert[q,targetUnit]convertedQuantity

converts the provided physical q to the Units of the provided targetUnit.

Convert[value,oldUnit,targetUnit]convertedValue

converts the numeric 'Value' from the oldUnit to the targetUnit.

Convert[values,oldUnits,targetUnits]convertedValues

converts each innermost list in 'Values' from the oldUnits to the targetUnits.

Details

  • Emerald version of the Mathematica 10 function UnitConvert.
  • The function is listable and can Convert an entire lists of items very quickly if all Units start in the same form (but must move more slowly if there are mixed Units).
  • Input
    Output
    Messages
  • NotConvertableCan not Convert between Units `1` and `2`.

Examples

Basic Examples  (5)

The function is used to Convert quantities between Units:

Conversions can be done between Units on raw numbers:

Unit definitions can include metric prefixes:

The function is aware of a vast array of possible unit conversions:

Can specify target Units as string expression:

Additional Examples  (13)

The function can Convert from mixed input Units, provided they are of the same type:

Paired lists of Units can be used as inputs as well:

Convert from numeric value to dimensionless unit:

Convert a distribution with units specified separately:

Convert a list of QuantityDistributions:

Coordinates with mixture of quantities and quantity distributions:

Coordinates with mixture of quantities and unitless distributions:

Specify single unit for everything in a QuantityArray:

Specify units at bottom level list in QuantityArray:

Specify units for every element in QuantityArray:

Convert a quantity distribution:

Convert a multi-variate quantity distribution:

Convert a QuantityFunction:

Messages  (1)

NotConvertable  (1)

If the function is provided two Units that aren't CompatibleUnitQ, then the NotConvertable message is thrown: