switchUnit
returns the closest length to a known unit. For example, 10e3m will give 10km.
Syntax
[fval funit] = closest_value(val, unit)
Input
val |
a value |
unit |
unit of the value (e.g. nm, m, ...) |
Output
oval |
output value |
ounit |
output unit |
MTEX 4.0.4 |