Commit ca5bf548 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Changed the behaviour of @dynDate/eq.

Return zero if A and B have no common frequencies (previously an error was returned).
parent 81f7f8a4
...@@ -55,7 +55,8 @@ if ~( isa(a,'dynDate') && isa(b,'dynDate')) ...@@ -55,7 +55,8 @@ if ~( isa(a,'dynDate') && isa(b,'dynDate'))
end end
if ~isequal(a.freq,b.freq) if ~isequal(a.freq,b.freq)
error(['dynDate::eq: Input arguments ' inputname(1) 'and ' inputname(2) ' have no common frequencies!']) c = 0;
return
end end
c = isequal(a.time,b.time); c = isequal(a.time,b.time);
...@@ -76,10 +77,11 @@ c = isequal(a.time,b.time); ...@@ -76,10 +77,11 @@ c = isequal(a.time,b.time);
%$ d5 = dynDate(date_5); %$ d5 = dynDate(date_5);
%$ try %$ try
%$ i1 = (d1==d2); %$ i1 = (d1==d2);
%$ t1 = 0;
%$ catch
%$ t1 = 1; %$ t1 = 1;
%$ catch
%$ t1 = 0;
%$ end %$ end
%$ t1 = t1 & ~i1;
%$ i2 = (d2==d2); %$ i2 = (d2==d2);
%$ i3 = (d4==d5); %$ i3 = (d4==d5);
%$ %$
...@@ -106,10 +108,11 @@ c = isequal(a.time,b.time); ...@@ -106,10 +108,11 @@ c = isequal(a.time,b.time);
%$ d5 = dynDate(date_5); %$ d5 = dynDate(date_5);
%$ try %$ try
%$ i1 = (d1==d2); %$ i1 = (d1==d2);
%$ t1 = 0;
%$ catch
%$ t1 = 1; %$ t1 = 1;
%$ catch
%$ t1 = 0;
%$ end %$ end
%$ t1 = t1 & ~i1;
%$ i2 = (d2==d2); %$ i2 = (d2==d2);
%$ i3 = (d4==d5); %$ i3 = (d4==d5);
%$ %$
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment