get
Get element or collection of elements from dataset
Syntax
element = get(dataset,index)
element = get(dataset,name)
element = get(dataset,{name})
Description
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.
Input Arguments
Output Arguments
Examples
Alternatives
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.
Version History
Introduced in R2011a