%% Compare Two Structures
% Create two structures and specify the fields in a different order.

A = struct('field1',0.005,'field2',2500);
B = struct('field2',2500,'field1',0.005);

%
% Compare the structures for equality.

tf = isequal(A,B)

% Even though the ordering of the fields in each structure is different, isequal treats them as the same because the values are equal.
% Copyright 2012 The MathWorks, Inc.