A simple function to merge two structures as long as they are the same size.
Ex:
[test1(1:2,1:2).A] = deal(1,2,3,4)
[test2(1:2,1:2).B] = deal(5,6,7,8)
out = fJoinStructures(test1, test2)
out =
2x2 struct array with fields:
B
A
Zitieren als
Grant Lohsen (2024). Merge Structures (https://www.mathworks.com/matlabcentral/fileexchange/31809-merge-structures), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Erstellt mit
R2011a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Mehr zu Structures finden Sie in Help Center und MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0.0 |