Commit d850af4b authored by Houtan Bastani's avatar Houtan Bastani Committed by Stéphane Adjemian (Charybdis)

fix bug with firstobservedperiod. closes #18

(cherry picked from commit 6b17c3de353d7202d4b47b7cc437063f4d542ad3)

(cherry picked from commit 41d10eb1)
parent 35a2805d
......@@ -27,7 +27,12 @@ function d = firstobservedperiod(o) % --*-- Unitary tests --*--
b = ~isnan(o);
c = find(prod(b, 2));
d = o.firstdate+(c(1)-1);
if isempty(c)
error('No overlapping non-NaN data points found in dseries.');
end
d = firstdate(o)+(c(1)-1);
%@test:1
%$ try
......
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