Using the C++ Math Library | ![]() ![]() |
Indexing into Cell Arrays
This section describes how to:
The examples all use the cell array N
. N
contains four cells: a 2-by-2 double array, a string array, an array that contains a complex number, and a scalar array.
This MATLAB code creates the array:
N{1,1} = [1 2; 4 5]; N{1,2} = 'Eric'; N{2,1} = 2-4i; N{2,2} = 7;
This MATLAB C++ Math Library code creates the array:
N.cell(1,1) = vertcat(horzcat(1, 2), horzcat(4, 5)); N.cell(1,2) = "Eric"; N.cell(2,1) = complex(2,-4); N.cell(2,2) = 7;
![]() | Deleting Elements from an Array | Overview | ![]() |