Commit b9e61f13 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

dynDates: bug fix

parent 1d70daa3
......@@ -68,7 +68,7 @@ switch S(1).type
case '()'
if isscalar(S(1).subs{1})
if isint(S(1).subs{1}) && S(1).subs{1}>0 && S(1).subs{1}<A.ndat
if isint(S(1).subs{1}) && S(1).subs{1}>0 && S(1).subs{1}<=A.ndat
B = dynDate(A.time(S(1).subs{1},:),A.freq);
error(['dynDates::subsref: the index have to be a positive integer less than or equal to ' int2str(A.ndat) '!'])
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