Added condition on dynSeries::lag method (input must be positive).

time-shift
Stéphane Adjemian (Charybdis) 2013-09-05 16:50:27 +02:00
parent 2975350319
commit 1edb4c6d9a
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,10 @@ if nargin<2
p = 1;
end
if p<=0
error('dynSeries::lag: Second input argument must be strictly positive! Use lead method instead.')
end
% Copy of ts dynSeries object
us = ts;