-->

Friday, May 17, 2013

indexing cells arrays


This example shows how to read and write data to and from a cell array. To run the code in this example, create a 2-by-3 cell array of text and numeric data:
C = {'one', 'two', 'three';
     1, 2, 3};
There are two ways to refer to the elements of a cell array: 
  1. Enclose indices in smooth parentheses, (), to refer to sets of cells—for example, to define a subset of the array.
  2. Enclose indices in curly braces, {}, to refer to the text, numbers, or other data within individual cells.

No comments:

Post a Comment