Skip to content
Snippets Groups Projects
Commit 7941541c authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

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

parent 0dfe2214
Branches
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment