23.07.2012 Views

MATLAB C++ Math Library Reference

MATLAB C++ Math Library Reference

MATLAB C++ Math Library Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

and even mwArrays, this routine can handle two-dimensional indexing of any<br />

type.<br />

mwSubArray operator()(const mwIndex &a, const mwIndex &b)<br />

Like its one-dimensional counterpart, this routine allows two-dimensional<br />

indexing expressions as the target of assignment statements.<br />

Cell Content Indexing. These two versions of the cell() member function let you<br />

index into the contents of a cell. For example, A.cell(1,2) refers to the<br />

contents of the cell in the second column of the first row in an array A.<br />

The cell() member functions follow the library convention for varargin<br />

functions. You can pass up to 32 arguments to the functions. To index into more<br />

than 32 dimensions, you must construct an mwVarargin object and pass it as<br />

the first argument. That object allows you to reference an additional 32<br />

arguments, the first of which can again be an mwVarargin object.<br />

The second non-const signature supports calls that are targets of the<br />

assignment operator and modify the contents of a cell.<br />

mwArray cell(const mwVarargin &RI1,<br />

const mwArray &OI2=mwArray::DIN,<br />

const mwArray &OI3=mwArray::DIN,<br />

.<br />

.<br />

.<br />

const mwArray &OI32=mwArray::DIN ) const;<br />

mwSubArray cell(const mwVarargin &RI1,<br />

const mwArray &OI2=mwArray::DIN,<br />

const mwArray &OI3=mwArray::DIN,<br />

.<br />

.<br />

.<br />

const mwArray &OI32=mwArray::DIN );<br />

Structure Field Indexing. The two versions of the field() member function let you<br />

reference the field of a structure. For example, A.field("name") accesses the<br />

contents of the field called name within the structure A.<br />

The second non-const signature supports calls that are targets of the<br />

assignment operator and modify the contents of a field.<br />

10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!