Matlab provides the isequal
function to compare two structures for equality. However, if two structures have slightly different contents, this function does not show the differences between the two structures. To show the differences between two structures, you can use recursive function given below:
main.m1753 chars41 lines
You can use this function to detect differences between two big structures by calling 'showStructureDifferences(S1, S2);' where S1 and S2 are the two structures to compare. The output will show all the fields with differences.
Note: This function compares two structures recursively and can handle nested structures as well.
gistlibby LogSnag