Skip to content
Snippets Groups Projects
Commit befdf3f6 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Merge pull request #2 from houtanb/master

fix test for dates creation when creating annual dates
parents 4c156241 bd73f401
No related branches found
No related tags found
No related merge requests found
classdef dates<handle classdef dates<handle
% Copyright (C) 2014 Dynare Team % Copyright (C) 2014-2015 Dynare Team
% %
% This code is free software: you can redistribute it and/or modify % This code is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by % it under the terms of the GNU General Public License as published by
...@@ -88,7 +88,7 @@ classdef dates<handle ...@@ -88,7 +88,7 @@ classdef dates<handle
o.freq = varargin{1}; o.freq = varargin{1};
end end
if isequal(o.freq, 1) if isequal(o.freq, 1)
if (isnumeric(varargin{2}) && isvector(varargin{2}) && isint(varargin{2})) if (isnumeric(varargin{2}) && isvector(varargin{2}) && all(isint(varargin{2})))
o.time = [varargin{2}, ones(length(varargin{2}),1)]; o.time = [varargin{2}, ones(length(varargin{2}),1)];
o.ndat = size(o.time,1); o.ndat = size(o.time,1);
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment