From 901ab2758c8abb7a944f80fcce8df7a72e9443f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Thu, 24 Oct 2013 09:42:15 +0200 Subject: [PATCH] Fixed bug (dates constructor of the form dates(FREQ, YEAR, SUBPERIOD) when FREQ is given by a character). --- matlab/utilities/dates/isdate.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/matlab/utilities/dates/isdate.m b/matlab/utilities/dates/isdate.m index 82c02d840..ebcd2816e 100644 --- a/matlab/utilities/dates/isdate.m +++ b/matlab/utilities/dates/isdate.m @@ -25,7 +25,11 @@ function b = isdate(str) % --*-- Unitary tests --*-- % You should have received a copy of the GNU General Public License % along with Dynare. If not, see . -b = isquaterly(str) || isyearly(str) || ismonthly(str) || isweekly(str); +if length(str)>1 + b = isquaterly(str) || isyearly(str) || ismonthly(str) || isweekly(str); +else + b = 0; +end %@test:1 %$