Fixed bug that pops up when adding an empty dates object with a non empty dates object.
parent
d8f1201a84
commit
8568292fcd
|
@ -23,7 +23,7 @@ function C = plus(A,B) % --*-- Unitary tests --*--
|
||||||
|
|
||||||
if isa(A,'dates') && isa(B,'dates')
|
if isa(A,'dates') && isa(B,'dates')
|
||||||
% Concatenate dates objects without removing repetitions if A and B are not disjoint sets of dates.
|
% Concatenate dates objects without removing repetitions if A and B are not disjoint sets of dates.
|
||||||
if ~isequal(A.freq,B.freq)
|
if ~isequal(A.freq,B.freq) && A.ndat>0 && B.ndat>0
|
||||||
error(['dates::plus: Input arguments ''' inputname(1) ''' and ''' inputname(2) ''' must have common frequencies!'])
|
error(['dates::plus: Input arguments ''' inputname(1) ''' and ''' inputname(2) ''' must have common frequencies!'])
|
||||||
end
|
end
|
||||||
if isempty(B)
|
if isempty(B)
|
||||||
|
|
Loading…
Reference in New Issue