dynDates: bug fix

time-shift
Houtan Bastani 2013-03-15 18:32:17 +01:00
parent 1d70daa3d9
commit b9e61f13ce
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ switch S(1).type
end
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);
else
error(['dynDates::subsref: the index have to be a positive integer less than or equal to ' int2str(A.ndat) '!'])