


@info:
! @deftypefn {Function File} {@var{sp} =} dynTime (@var{a})
! @anchor{dynTime}
! @sp 1
! Constructor for the Dynare dynTime class.
! @sp 2
! @strong{Inputs}
! @sp 1
! @table @ @var
! @item a
! dynTime object instantiated by @ref{dynTime}.
! @end table
! @sp 2
! @strong{Outputs}
! @sp 1
! @table @ @var
! @item sp
! dynTime object.
! @end table
! @sp 2
! @strong{Properties}
! @sp 1
! The constructor defines the following properties:
! @sp 1
! @table @ @var
! @item freq
! Scalar integer, the frequency of the time series. @var{freq} is equal to 1 if data are on a yearly basis or if
! frequency is unspecified. @var{freq} is equal to 4 if data are on a quaterly basis. @var{freq} is equal to
! 12 if data are on a monthly basis. @var{freq} is equal to 52 if data are on a weekly basis.
! @item time
! Array of integers (nobs*2). The first column defines the years associated to each observation. The second column,
! depending on the frequency, indicates the week, month or quarter numbers. For yearly data or unspecified frequency
! the second column is filled by ones.
! @end table
! @sp 1
! @strong{This function is called by:}
! @sp 2
! @strong{This function calls:}
!
! @end deftypefn
@eod:

0001 function sp = dynTime(a) 0002 %@info: 0003 %! @deftypefn {Function File} {@var{sp} =} dynTime (@var{a}) 0004 %! @anchor{dynTime} 0005 %! @sp 1 0006 %! Constructor for the Dynare dynTime class. 0007 %! @sp 2 0008 %! @strong{Inputs} 0009 %! @sp 1 0010 %! @table @ @var 0011 %! @item a 0012 %! dynTime object instantiated by @ref{dynTime}. 0013 %! @end table 0014 %! @sp 2 0015 %! @strong{Outputs} 0016 %! @sp 1 0017 %! @table @ @var 0018 %! @item sp 0019 %! dynTime object. 0020 %! @end table 0021 %! @sp 2 0022 %! @strong{Properties} 0023 %! @sp 1 0024 %! The constructor defines the following properties: 0025 %! @sp 1 0026 %! @table @ @var 0027 %! @item freq 0028 %! Scalar integer, the frequency of the time series. @var{freq} is equal to 1 if data are on a yearly basis or if 0029 %! frequency is unspecified. @var{freq} is equal to 4 if data are on a quaterly basis. @var{freq} is equal to 0030 %! 12 if data are on a monthly basis. @var{freq} is equal to 52 if data are on a weekly basis. 0031 %! @item time 0032 %! Array of integers (nobs*2). The first column defines the years associated to each observation. The second column, 0033 %! depending on the frequency, indicates the week, month or quarter numbers. For yearly data or unspecified frequency 0034 %! the second column is filled by ones. 0035 %! @end table 0036 %! @sp 1 0037 %! @strong{This function is called by:} 0038 %! @sp 2 0039 %! @strong{This function calls:} 0040 %! 0041 %! @end deftypefn 0042 %@eod: 0043 0044 % Copyright (C) 2011 Dynare Team 0045 % stephane DOT adjemian AT univ DASH lemans DOT fr 0046 % 0047 % This file is part of Dynare. 0048 % 0049 % Dynare is free software: you can redistribute it and/or modify 0050 % it under the terms of the GNU General Public License as published by 0051 % the Free Software Foundation, either version 3 of the License, or 0052 % (at your option) any later version. 0053 % 0054 % Dynare is distributed in the hope that it will be useful, 0055 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0056 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0057 % GNU General Public License for more details. 0058 % 0059 % You should have received a copy of the GNU General Public License 0060 % along with Dynare. If not, see <http://www.gnu.org/licenses/>. 0061 0062 sp = struct; 0063 0064 sp.freq = []; 0065 sp.time = []; 0066 0067 sp = class(sp,'dynTime'); 0068 0069 switch nargin 0070 case 0 0071 return 0072 case 1 0073 if isa(a,'dynTime') 0074 sp = a; 0075 else 0076 error(['dynTime::dynTime: Input argument ' inputname(1) ' must be a dynTime object!']) 0077 end 0078 otherwise 0079 error(['dynTime::dynTime: Too many input arguments!']) 0080 end