Commit 44440755 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed bug.

parent 95f36ecc
......@@ -69,11 +69,15 @@ if isequal(S(1).type,'.')
error('dynDates::subsref: Unknown public method or member!')
end
elseif isequal(S.type,'()') % Extract a sub-sample.
if isscalar(S.subs) && isint(S.subs{1}) && S.subs{1}>0 && S.subs{1}<A.ndat
B = dynDate(A.time(S.subs{1},:),A.freq);
if isscalar(S.subs{1})
if isint(S.subs{1}) && S.subs{1}>0 && S.subs{1}<A.ndat
B = dynDate(A.time(S.subs{1},:),A.freq);
else
error('dynDates::subsref: Something is wrong in your syntax!')
end
else
B = builtin('subsref', A.time, S);
end
else
error('dynDates::subsref: Something is wrong in your syntax!')
end
end
\ No newline at end of file
Supports Markdown
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