| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
c = struct2cell(s)
c = struct2cell(s) converts the m-by-n structure s (with p fields) into a p-by-m-by-n cell array c.
If structure s is multidimensional, cell array c has size [p size(s)].
The commands
clear s, s.category = 'tree'; s.height = 37.4; s.name = 'birch';
create the structure
s =
category: 'tree'
height: 37.4000
name: 'birch'Converting the structure to a cell array,
c = struct2cell(s)
c =
'tree'
[37.4000]
'birch'cell2struct, cell, iscell, struct, isstruct, fieldnames, dynamic field names
![]() | struct | structfun | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |