dynare/matlab/@dates/end.m

34 lines
1.1 KiB
Matlab
Raw Normal View History

2013-04-02 11:12:00 +02:00
function lastIndex = end(o, k, n)
2013-10-30 09:32:51 +01:00
% Overloads end keyword.
2013-04-02 11:12:00 +02:00
%
% INPUTS
2013-10-15 15:36:21 +02:00
% o [dates] dates object
2013-04-02 11:12:00 +02:00
% k [integer] index where end appears
% n [integer] number of indices
%
% OUTPUTS
2013-10-15 15:36:21 +02:00
% lastIndex [integer] last dates index
2013-04-02 11:12:00 +02:00
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
2013-10-30 09:32:51 +01:00
assert(k==1 && n==1, 'dates::end: dates only has one dimension');
lastIndex = o.ndat;