Programming Previous page   Next Page

Converting Between Cell and Numeric Arrays

Use for loops to convert between cell and numeric formats. For example, create a cell array F:

Now use three for loops to copy the contents of F into a numeric array NUM:

Similarly, you must use for loops to assign each value of a numeric array to a single cell of a cell array:


Previous page  Nesting Cell Arrays Cell Arrays of Structures Next page

© 1994-2005 The MathWorks, Inc.