simscape.Value
Description
simscape.Value
lets you perform mathematical operations on values
with units. A simscape.Value
object binds an array of numeric values to a
unit of measure and propagates this unit through mathematical operations. All members of the
array must have the same unit.
Creation
Description
Input Arguments
Object Functions
You can also use core MATLAB® array functions with simscape.Value
arrays. For more
information, see Working with simscape.Value and simscape.Unit Objects.
Examples
Limitations
Direct block parameterization is not supported, that is, you cannot use
simscape.Value
objects directly to specify block parameters. You can use these objects only during programmatic model construction.You cannot use
simscape.Value
objects to specify values with units or perform unit computations in Symbolic Math Toolbox™.MATLAB Coder™ does not support
simscape.Value
objects.simscape.Value
arrays do not support complex data.simscape.Value
arrays do not support sparse data.You can use MAT-files to save and load
simscape.Value
objects. However, unit derivation is not saved with the units, so if asimscape.Value
object is saved with a unit and loaded in a subsequent MATLAB session where some part of the unit is not defined, then MATLAB issues a warning and the object results in an invalid variable.