Using the C++ Math Library | ![]() ![]() |
Overview
A one-dimensional subscript contains a single index, which can be a scalar, a vector, a matrix, or a call to the colon()
function. The size and shape of the one-dimensional index determine the size and shape of the result. For example, a one-dimensional column vector index produces a one-dimensional column vector result.
To apply a one-dimensional subscript to an N-dimensional array, you need to know how to go from the one-dimensional index value to a location inside the array. See Array Storage for complete details on how MATLAB counts one-dimensionally through arrays of N dimensions.
![]() | Using One-Dimensional Subscripts | Selecting a Single Element | ![]() |