MATLAB Function Reference |
Syntax
c = struct2cell(s)
Description
c = struct2cell(s)
把 m
-by-n
的結構 s
(且包含 p
個欄位) 轉換成 p
-by-m
-by-n
的異質陣列 c
。
若結構 s
為多維的,異質陣列 c
的大小為 [p size(s)]
。
Examples
clear s, s.category = 'tree'; s.height = 37.4; s.name = 'birch';
s = category: 'tree' height: 37.4000 name: 'birch'
c = struct2cell(s) c = 'tree' [37.4000] 'birch'
See Also
struct | strvcat |