Class: Simulink.SimulationData.Dataset
Package: Simulink.SimulationData
Change element stored at specified index
dataset = setElement(dataset,index,... element)
dataset = setElement(index,element, name)
changes the element stored at the specified index, for an existing index. If
dataset
= setElement(dataset
,index
,... element
)index
is one greater than the number of elements in the data set, the
function adds the element at the end of the data set.
dataset = setElement(
changes the element stored at the specified index and gives it the name that you specify. You
can use index
,element
, name
)name
to identify an element that does not have a name. If the
signal already has a name, the element instead uses the name you specify by using the
name
argument.
You can use curly braces to streamline indexing syntax to change an element in a dataset,
instead of using setElement
. The index must be a scalar that is not greater
than the number of elements in the variable. For example, change the name of second element of
the logsout
dataset.
logsout{2}.Name = 'secondSignal'
addElement
| concat
| find
| get
| getElementNames
| numElements
| Simulink.SimulationData.BlockPath
| Simulink.SimulationData.Dataset
| Simulink.SimulationData.DataStoreMemory
| Simulink.SimulationData.Signal