I see there is a related question now which has an "accepted answer".
I am heartened that at the the bottom it does say "The development team is considering improving the error message to point directly to the offending change that is causing the loading of the Operating Point to fail. "
I'm not allowed to comment on the answer in that thread, which is a shame, so I enter a comment here.
The attachment example.zip (function getCheckSumDiff)) which is uploaded with the "accepted answer" has been really helpful for us.
One thing I would say is that in the example function getCheckSumDiff(), there are some parts that need to be slightly modified to work to make it work in all cases.
The most obvious and easiest is that for
if(ischar(checksumItems1(idx).Value))
if (~strcmp(checksumItems1(idx).Value, ...
checksumItems2(idx).Value))
idxForDifferences=[idxForDifferences,idx];
end
end
and
if(ischar(checksumItems1(idx).Value))
if (~strcmp(checksumItems1(idx).Value, ...
checksumItems2(idx).Value))
idxForDifferences=[idxForDifferences,idx];
end
end
You need to do the comparisons, not using strcmp and "~=", because in many cases, the values are arrays, and the result of strcmp of "~=" is then an array of boolean values, and then the if() statement on an array of boolean true/false flags only takes into account the first element.
So, getCheckSumDiff() in the example.zip doesn't find all the differences, and can sometimes report NO differences, even though the overall checksum is different.
Code that works better in this area, which checks the whole array (or sets of string) and returns a single boolean flag for the if to work on:
elseif (ischar(item1.Value) || (isnumeric(item2.Value)))
if (~isequal(item1.Value, item2.Value)) % Crucial here to use array comparison, not just ~=, because item1 and item2 could be scalar, or arrays, of same or different sizes.
idxForDifferences = [idxForDifferences,idx];
end
There are also some other areas of the function which we have augmented, for example so that values which are cells or structures can also be checked (every element and every sub-structure/field of every value). We also check first that classes of every value are the same. Presently the attachment example.zip (function getCheckSumDiff) skips over any values which are cell arrays or structures, and so getCheckSumDiff in that example can miss differences in some cases.