Help CenterHelp Center
simscape.Value
Return unit associated with simscape.Value array
Since R2021b
U = unit(V)
example
U = unit(V) returns the associated unit of the simscape.Value object, V, as a simscape.Unit object.
U
V
simscape.Unit
collapse all
Create a simscape.Value object:
V = simscape.Value([10 20 30], 'm/s^2')
V = 10 20 30 : m/s^2
Get the unit of the object:
U = m/s^2
Array of numeric values with unit, specified as a simscape.Value object.
Example: 10 : m/s^2
Unit associated with the simscape.Value object, V, returned as a simscape.Unit object. U is a 1x1 unit array.
Introduced in R2021b
simscape.Value | simscape.Unit
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office