Question: Combining and converting units


 

``

  Note: To enter units, I used the unit key (blue) in the Units palette.

  When I use the combine and simplify functions to manipulate temperature units, Maple returns a wrong answer, as we can see below;

combine(20*Unit(Unit('Celsius'))+30*Unit('K'), units)

50*Units:-Unit(K)

(1)

simplify(20*Unit(Unit('Celsius'))+30*Unit('K'))

50*Units:-Unit(K)

(2)

  The quantity 20 Celsius is not converted correctly. However, for other types of dimensions, the combine and simplify functions work correctly.

combine(10*Unit('m')+120*Unit('cm')+200*Unit('ft'), units)

(1804/25)*Units:-Unit(m)

(3)

simplify(10*Unit('m')+120*Unit('cm')+200*Unit('ft'))

(1804/25)*Units:-Unit(m)

(4)

``

Another strange thing happens with the convert function, with temperature units. When we use the same source unit, the convert function deletes the unit, leaving only the quantity.

convert(30*Unit('K'), temperature, Unit('K'))

30

(5)

 I do not understand why this occurs.

convert(10*Unit('m'), units, Unit('m'))

10*Units:-Unit(m)

(6)

I do not understand why this occurs.

 

Oliveira


 

Download Matching_units.mw

Please Wait...