transpose_structure
版本 1.1.0.0 (1.3 KB) 作者:
Alex Liberzon
transpose_structure(s) transposes all the fields in the structure. useful for later cat(1,s.field)
Users that often use cat(1,s.field) find annoying that this function generates error if the field is in different orientation (row or column vector). Instead of try ... catch, it's suggested to use transpose_structure(s).
>> s = struct('x',ones(10,1),'y',zeros(5,1));
>> s = transpose_structure(s)
引用格式
Alex Liberzon (2024). transpose_structure (https://www.mathworks.com/matlabcentral/fileexchange/40142-transpose_structure), MATLAB Central File Exchange. 检索来源 .
MATLAB 版本兼容性
创建方式
R2010a
兼容任何版本
平台兼容性
Windows macOS Linux类别
在 Help Center 和 MATLAB Answers 中查找有关 Structures 的更多信息
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!