Commit 7154079a authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed bug related to the initialization of the dseries and dates object (test...

Fixed bug related to the initialization of the dseries and dates object (test that the input argument is a string).
parent c5005e60
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment