Main Content

getElementNames

Class: Simulink.SimulationData.Dataset
Package: Simulink.SimulationData

Return names of all elements in dataset

Description

example

element_list = getElementNames(dataset) returns the names of all of the elements in the Simulink.SimulationData.Dataset object.

Input Arguments

expand all

The data set from which to the element name.

Output Arguments

expand all

Data set, returned as a cell array of the character vectors containing names of all of the elements of the dataset.

Examples

expand all

Return the names of the elements for the topOut data set (the signal logging data).

open_system(docpath(fullfile(docroot,'toolbox','simulink',...
'examples','ex_bus_logging')));
open_system(docpath(fullfile(docroot,'toolbox','simulink',...
'examples','ex_mdlref_counter_bus')));
sim('ex_bus_logging')
el_names = topOut.getElementNames
el_names = 

    'COUNTERBUS'
    'OUTPUTBUS'
    'INCREMENTBUS'
    'inner_bus'
Introduced in R2011a