Fixed bug related to the initialization of the dseries and dates object (test that the input argument is a string).

time-shift
Stéphane Adjemian (Charybdis) 2014-06-08 16:52:41 +02:00
parent f0a3d6ad44
commit ff27824b29
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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;