struct array
显示 更早的评论
Hi guys,
There are two struct arrays, A, B; They both have a member data called "id". For example: A(1).id = []; A(2).id = [] B(1).id = 'hello'; B(2).id = 'yes';
I'd like to copy the "id" of B to A without using loop.
Is there any method?
Thanks
1 个评论
Fangjun Jiang
2011-9-22
help deal, among a few other solutions.
采纳的回答
更多回答(1 个)
Daniel Shub
2011-9-22
Does this work?
[A(:).id] = B(:).id
类别
在 帮助中心 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!