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

Fixed bug. Allow selection of an observation with a date defined in a formatted string.

(cherry picked from commit 3534c68b)
parent 1feb0a43
Branches
Tags
No related merge requests found
......@@ -203,9 +203,14 @@ switch S(1).type
% Do nothing.
B = A;
end
elseif isdates(S(1).subs{1})
elseif isdates(S(1).subs{1}) || isdate(S(1).subs{1})
if isdate(S(1).subs{1})
Dates = dates(S(1).subs{1});
else
Dates = S(1).subs{1};
end
% Extract a subsample using a dates object
[junk,tdx] = intersect(A.dates.time,S(1).subs{1}.time,'rows');
[junk,tdx] = intersect(A.dates.time,Dates.time,'rows');
B = dseries();
B.data = A.data(tdx,:);
B.name = A.name;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment