Handle the case where the second argument is empty more efficiently.

parent 0dfe2214
......@@ -34,6 +34,11 @@ if ~isequal(o.freq,p.freq)
error('dates;setdiff','All input arguments must have common frequency!')
end
if isempty(p)
q = copy(o);
return
end
if o==p
q = dates(o.freq);
return
......
Markdown is supported
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