To check if two structures have identical variables, you can use the following function which compares the field names and values of both structures. If they are the same, it returns true
, otherwise false
.
main.m179 chars5 lines
Example usage:
main.m201 chars10 lines
Note that this function assumes that the fieldnames and corresponding values are of the same type and size for both structures.
gistlibby LogSnag