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)
229.0 次下载
更新时间 2013/2/5

查看许可证

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 CenterMATLAB Answers 中查找有关 Structures 的更多信息
标签 添加标签

Community Treasure Hunt

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

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

replaced length() by numel()

1.0.0.0