From 121aa5038c5eaa3b5821ee2895f196d92a4264eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Scylla=29?= Date: Fri, 29 Nov 2013 15:50:36 +0100 Subject: [PATCH] Bug fix. Input must be numeric in the first place. --- matlab/isint.m | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/matlab/isint.m b/matlab/isint.m index 111fc21e4..9f59a5e91 100644 --- a/matlab/isint.m +++ b/matlab/isint.m @@ -32,7 +32,17 @@ function [b,c,d] = isint(a) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see . +if ~isnumeric(a) + b = 0; + if nargout>1 + c = []; + d = []; + end + return +end + [m,n] = size(a); + b = abs(fix(a)-a)<1e-15; if nargout>1