Main Content

matlab::data::Struct

Element type for MATLAB struct arrays

Description

Struct is the element type for a StructArray object.

Class Details

Namespace:

matlab::data

Include:

Struct.hpp

Iterators

Begin Iterators

const_iterator begin() const

const_iterator cbegin() const

Returns

const_iterator

Iterator to beginning of array, specified as TypedIterator<typename std::add_const<T>::type>

Throws

None

End Iterators

const_iterator end() const

const_iterator cend() const

Returns

const_iterator

Iterator to end of array, specified as TypedIterator<typename std::add_const<T>::type>

Throws

None

Indexing Operators

operator[]

Array operator[](std::string idx) const

Description

Enables [] indexing on a StructArray object. Indexing is 0-based.

Parameters

std::string idx

Field name.

Returns

Array

Shared copy of Array found at specified field.

Throws

matlab::data::InvalidFieldNameException

Field does not exist in this StructArray.

Version History

Introduced in R2017b