struct2mat(S)

版本 1.0.0.0 (1.1 KB) 作者: Francisco
STRUCT2MAT Converts a structure into a matrix.
812.0 次下载
更新时间 2016/1/6

查看许可证

[X,n]= STRUCT2MAT(S) converts a structre S into a numeric matrix X. The
contents of each *numeric* field of S (either a vector or a matrix) will
form 1 column of X. Fieldnames are returned in cell array 'n'. If the
fields of S aren't of the same length, the columns of X will be padded
with NaN.
Example:
s= struct('a',['string of letters'],'b',[1 2; 3 4],'c',[1 2 3 4 5 6 7 8 9])
[x,n]= struct2mat(s)

引用格式

Francisco (2024). struct2mat(S) (https://www.mathworks.com/matlabcentral/fileexchange/54766-struct2mat-s), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2012b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0