Fixed bug related to the initialization of the dseries and dates object (test that the input argument is a string).
parent
f0a3d6ad44
commit
ff27824b29
|
@ -62,7 +62,7 @@ function dd = dates(varargin) % --*-- Unitary tests --*--
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if nargin>0 && isequal(varargin{1},'initialize')
|
||||
if nargin>0 && ischar(varargin{1}) && isequal(varargin{1},'initialize')
|
||||
dd = struct('ndat', 0, 'freq', NaN(0), 'time', NaN(0,2));
|
||||
dd = class(dd,'dates');
|
||||
assignin('base','emptydatesobject',dd);
|
||||
|
|
|
@ -76,7 +76,7 @@ function ts = dseries(varargin) % --*-- Unitary tests --*--
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if nargin>0 && isequal(varargin{1},'initialize')
|
||||
if nargin>0 && ischar(varargin{1}) && isequal(varargin{1},'initialize')
|
||||
ts = struct;
|
||||
ts.data = [];
|
||||
ts.nobs = 0;
|
||||
|
|
Loading…
Reference in New Issue