| Using the C++ Math Library | ![]() |
C++ and MATLAB Indexing Syntax
The table below summarizes differences between C++ and MATLAB standard array indexing syntax. Although the MATLAB C++ Math Library provides the same functionality as the MATLAB interpreter, the syntax of some operations is slightly different. In particular, you must use the colon() function rather than the colon operator.
Though not listed here, you must use mwArray.cell() rather than {} and mwArray::field() rather than the period (.) that references a structure field.
Note
For the examples in the table, matrix X is set to the 2-by-2 matrix[ 4 5 ; 6 7 ], a different value from the 3-by-3 matrix A in the previous sections. |
4 5 6 7
| Concatenating Subscripts | The mwIndex Class | ![]() |