Using the C Math Library    

Indexing into Arrays


Introduction

MATLAB provides access to elements in arrays, cell arrays, and structures through indexing. Using MATLAB indexing syntax, you can access individual elements, modify elements or delete elements in an array, cell array, or structure. For example, A(3,1) accesses the first element in row 3 of matrix A.

The MATLAB C Math Library provides the same indexing functionality as the MATLAB interpreter but through a different mechanism. Instead of an indexing operator, the MATLAB C Math Library provides the following indexing functions.

Function
Description
mlfIndexRef()
Read one or more values from an array, cell array, or structure.
mlfIndexAssign()
Change one or more values in an array, cell array, or structure.
mlfIndexDelete()
Remove one or more elements from an array, cell array, or structure.

This section:

The section ends with a comparison of MATLAB and Math library indexing syntax.


 Replacing Allocation and Deallocation Routines Terminology