Hi,
I am comparing two .mat files, both have very complicated struct type data but they should be almost identical. In this case, I don't found other method except for isequal can perform the comparsion.
data = load('MMC4_cpu_HVDC.mat');data_ref = load('MMC4_cpu_HVDC_ref.mat');isequal(data,data_ref)
The code above produced ans = 0. I checked using visdiff, found that it is due to some very small difference in number.
visdiff('MMC4_cpu_HVDC.mat', 'MMC4_cpu_HVDC_ref.mat')% 13.581349668075767
% ans =
% 13.5813
% 13.581349668075765
% ans =% 13.5813
I would like to ask if it is possible to add a tolerance factor to isequal? or are there other ways to compare these two .mat files? Example data are attached. Many thanks.
Andy
Best Answer