CatStruct2

Concatenates Structures (fields each depth are merged)

您现在正在关注此提交

FinalStruct = CatStruct2(S1,S2) concatenates the structures S1 and S2 into one structure FinalStruct.

The fieldnames at each depth will be compared. In case the field name is found in both structures, the second occurence will overwrite the value of the first.

CatStruct2(S1,S2,'sorted') will sort the fieldnames alphabetically after merging the two structures.

Thanks to Jos van der Geest for providing the source code of CATSTRUCT on
http://www.mathworks.com/matlabcentral/fileexchange/7842-catstruct/content/catstruct.m

引用格式

Hassan (2026). CatStruct2 (https://ww2.mathworks.cn/matlabcentral/fileexchange/34401-catstruct2), MATLAB Central File Exchange. 检索时间: .

类别

Help CenterMATLAB Answers 中查找有关 Structures 的更多信息

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.0.0.0