MATLAB Compiler Previous page   Next Page

mwArray operator()(int i1, int i2, int i3, ..., )

Return single element at the specified 1-based index. The index is passed as a comma-separated list of 1-based indices. This operator is overloaded to support 1 through 32 indices.

C++ syntax

Arguments

i1, i2, i3, ..., .   Comma-separated list of input indices.

Return value

An mwArray containing the value at the specified index.

Description

Use this operator to fetch a single element at a specified index. The index is passed as a comma-separated list of 1-based indices. The valid number of indices that can be passed in is either 1 (single subscript indexing), in which case the element at the specified 1-based offset is returned, accessing data in column-wise order, or NumberOfDimensions() (multiple subscript indexing), in which case, the index list is used to access the specified element. The valid range for indices is 1 <= index <= NumberOfElements(), for single subscript indexing. For multiple subscript indexing, the ith index has the valid range: 1 <= index[i] <= GetDimensions().Get(1, i). An mwException is thrown if an invalid number of indices is passed in or if any index is out of bounds.


Previous page  void SetCharData(mxChar* buffer, int len) mwArray operator()(const char* name, int i1, int i2, int i3, ..., ) Next page

© 1994-2005 The MathWorks, Inc.