Changeset 26797


Ignore:
Timestamp:
01/20/22 10:10:35 (3 years ago)
Author:
Mathieu Morlighem
Message:

CHG: fixing model compare for 2d arrays

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/m/consistency/comparemodels.m

    r25502 r26797  
    2727        if any(size(field1)~=size(field2)),
    2828                disp([fieldname ' do not have the same size']);
    29         elseif isnumeric(field1),
     29        elseif isnumeric(field1)
    3030                if numel(field1)==1 & isnan(field1) & isnan(field2),
    3131                        %Do not do anything
    32                 elseif any(field1~=field2),
     32                elseif any(field1(:)~=field2(:))
    3333                        %Deal with NaN...
    3434                        pos1=find(isnan(field1));
     
    3636                        if numel(pos1)==numel(pos2) & all(pos1==pos2),
    3737                                field1(pos1)=0; field2(pos2)=0;
    38                                 if any(field1~=field2),
     38                                if any(field1(:)~=field2(:))
    3939                                        disp([fieldname ' differs']);
    4040                                end
Note: See TracChangeset for help on using the changeset viewer.