WOLFRAM SYSTEM MODELER
inUnitConvert amount-of-quantity to unit |
SystemModel["SystemModelerExtras.Experimental.Units.inUnit"]
The call inUnit(u, unit) represents a unit conversion of the value of quantity u to the unit unit. The argument unit must be an evaluable String expression (typically a String literal) with valid unit syntax, and there has to exist a valid conversion from the unit of u to the unit unit.
It is an error if the unit of u cannot be determined. This will be the case when u has undefined unit due to incompleteness of the unit handling system, but can also happen as a result of disabling all or parts of the unit handling system.
It is an error if it is undefined whether u is absolute or relative, while this information would affect the conversion. For example, a conversion from "K" to "degC" requires this information.
After model translation, the call inUnit(u, unit) will have been replaced a concrete arithmetic operation on u.
To only get the numerical value of the converted value of quantity, use withoutUnit instead.
u |
Type: Real Description: Amount-of-quantity to be converted |
---|---|
unit |
Type: String Description: Conversion target unit |
y |
Type: Real Description: Amount-of-quantity expressed in 'unit' |
---|