struct2cell
Creates a cell array from the struct s.
Syntax
struct2cell(s)
Inputs
- s
- Type: double | integer | char | string | logical | struct | cell
Outputs
- R
- Resulting struct.
Example
Simple struct2cell
example:
a = struct('age', {22; 24; 26}, 'name', {'Bob';'Mike';'Dave'}); % must be column cell arrays
R = struct2cell(a)
R =
{
[1,1] 22
[1,2] 24
[1,3] 26
[2,1] Bob
[2,2] Mike
[2,3] Dave
}