Comparing two structures and find the common
显示 更早的评论
I need to compare two strctures and find the common between them and then keep the common fields as the new structure.
4 个评论
Geoff Hayes
2019-3-10
Praveen - please clarify what you mean by the common between them. Do the structures have fields that you want to compare? Or something else? Please provide a small example.
Praveen Kumar Pakkirisamy
2019-3-10
KALYAN ACHARJYA
2019-3-10
structure_1={'field1','field2','field3'};
structure_2={'field1','field4','field3'};
structure_1=intersect(structure_1,structure_2)
madhan ravi
2019-3-10
Sir Walter has given the answer already before 24mins..
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!