A2 = convert(A1,unit1,unit2)
converts a numeric array, A1, from unit1 to
unit2 by applying the appropriate scaling factor to the numeric
values. unit1 and unit2 must be
commensurate.
A2 = convert(A1,unit1,unit2,conversiontype)
lets you select whether to apply affine or linear conversion to thermal units. Affine
conversion is the default.
Array of numeric values, specified as a scalar, vector, or matrix. The array cannot
contain complex values and cannot be sparse.
Example: [1.5 2]
Data Types: double | single
unit1 — Physical unit expression scalar simscape.Unit object
Physical unit expression, specified as a scalar simscape.Unit
object.
Example: m
unit2 — Physical unit expression scalar simscape.Unit object
Physical unit expression, specified as a scalar simscape.Unit
object. unit1 and unit2 must be
commensurate.
Example: mm
conversiontype — Conversion type for thermal units 'affine' (default) | 'linear'
Thermal units often require an affine conversion, that is, a conversion that
performs both multiplication and addition. For more information, see About Affine Units.
Specify the type of conversion:
'affine' — Perform unit conversion that uses both
multiplication and addition.
'linear' — Perform unit conversion by applying just the
linear term.
Array of numeric values, returned as a scalar, vector, or matrix in the same data
type as the input array A1, with numeric values scaled according to
the conversion factor between the two units, unit1 and
unit2.