Programming Previous page   Next Page

Generating a List from a Structure

For structures, extracting a field of the structure that exists across one of its dimensions yields a comma-separated list.

Start by converting the cell array used above into a 4-by-1 MATLAB structure with six fields: f1 through f6. Read field f5 for all rows and MATLAB returns a comma-separated list:

This is the same as explicitly typing


Previous page  Comma-Separated Lists How to Use the Comma-Separated List Next page

© 1994-2005 The MathWorks, Inc.