comparestructs
%[same,different,diffvals] = comparestructs(A,B)
%Compares two structures of the same size and determines which fields are the same, and which are different; returns a structure of fields which are different to faciliate comparisons.
%This is useful for comparing properties (ex: tmp1 = get(axes1);tmp2=get(axes2); [same, different] = comparestructs(tmp1,tmp2))
%to see how an item has changed.
Tested under MATLAB R12 and R13.
Cite As
Brett Shoelson (2024). comparestructs (https://www.mathworks.com/matlabcentral/fileexchange/2965-comparestructs), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Language Fundamentals > Operators and Elementary Operations >
- MATLAB > Language Fundamentals > Data Types > Structures >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |