This is a funtionality I required for my GUI simulator where the user enters parameters in GUI and these parameters over-ride the default ones of the simulator. Merge funtionality adds these parameters as 'extra'. I can not afford to have bugs in this one (ofcourse :)). So if you kindly find any bugs let me know. I have made it general so other users can use it if they require. Also its case-sensitive which is annoying.
This submission could (should?) be made recursive to handle the case when the fields of the top-level structures are themselves structures.
Did exactly what I needed to do. Thank you!! Great for a gui that has a lot of parameters. You can create a default structure in the function then pass it just the user overwrites and use this function to merge and make the correct overwrites!
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.