www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/CompareTwoStructuresEQNExample.m
%% 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 = isequaln(A,B) %% % Even though the ordering of the fields in each structure is different, % |isequaln| treats them as the same because the values are equal.