How to merge multiple structure with same name into one structure?

2 views (last 30 days)
I have generated structures with same name'histStruct' and they are saved in different files. In each histStruct.mat file there are same numbers and names of fields. I want to combine all the structures into one structure.same field merges together. for examples: if I have two histStruct.mat files in two different files. one is in 'C:\Users\Administrator\Desktop\test'and the other is in 'C:\Users\Administrator\Desktop\test2' and I want to combine these two histStruct into one. the first histStruct has the content as following. histVel: [12441x1 double] median: 0.1499 mean: 0.1599 stdev: 0.0552 incidence: 18.5516 the second histStruct has the content as following histVel: [17736x1 double] median: 0.1676 mean: 0.1803 stdev: 0.0651 incidence: 28.1800 Actually, I wanted to combine histVel together from each histStruct. Can you help me? Thank you very much.

Answers (1)

per isakson
per isakson on 28 Dec 2013
Search the File Exchange for merge structure

Categories

Find more on Structures in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!