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.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.