Class: Simulink.SimulationData.Dataset
Package: Simulink.SimulationData
Get element or collection of elements from dataset
element = get(dataset,index)
element = get(dataset,name)
element = get(dataset,{name})
element = get(
returns
the element corresponding to the dataset
,index
)index
. The getElement
method
uses the same syntax and behavior as the get
method.
element = get(
returns
the element whose name matches dataset
,name
)name
. When name
is
in a cell array, return the index of the element whose name matches name
.
element = get(
returns
a single element if only one element name matches, a dataset
,{name
})SimulationData.Dataset
if
multiple elements with this name exist.
If you use Log Dataset data to file to create the MAT-file, use getAsDatastore
for
fast access to the data.
You can use curly braces to streamline indexing syntax to get
an element in a dataset, instead of using get
or getElement
.
The index must be a scalar that is not greater than the number of
elements in the variable. For example, get the second element of the logsout
dataset.
logsout{2}
Also, you can use the find
method to get
an element or collection of elements from a dataset.
addElement
| concat
| find
| getElementNames
| numElements
| setElement
| Simulink.SimulationData.BlockPath
| Simulink.SimulationData.Dataset
| Simulink.SimulationData.DataStoreMemory
| Simulink.SimulationData.Signal