This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Class: Simulink.SimulationData.Unit
Package: Simulink.SimulationData

Specify name of logging data units


unitObject = setName(unitObj,unitName)


unitObject = setName(unitObj,unitName) sets the name for the Simulink.SimulationData.Unit object to the name specified in unitName.

Input Arguments

expand all

Logging data unit object to name, specified as a Simulink.SimulationData.Unit object.

Name of logging data unit, specified as a character vector.

Output Arguments

expand all

Name of logging data units, returned as a character vector.


expand all

inchesUnit = Simulink.SimulationData.Unit('in');
inchesUnit = setName(inchesUnit,'inches')
inchesUnit = 

  Units with properties:

    Name: 'inches'

Introduced in R2011a