How to convert fields in a struct into an int?
22 次查看(过去 30 天)
显示 更早的评论
I have a struct with 48 fields each 1X128 int32 in it.
I want to combine all the fields into a single 48X128 int32, how do I accomplish it?
2 个评论
回答(1 个)
Stephen23
2023-1-21
编辑:Stephen23
2023-1-21
This would be much easier if your data were better designed, exactly as I recommended in your last question (which you have so far not responded to):
The data design means more steps are required. For example, where S is your 1x1 structure:
C = struct2cell(S);
M = vertcat(C{:})
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!