From e96f180c50a02d4c2c7796dc86b5c223ad7a5932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Tue, 25 Jun 2019 20:28:59 +0200 Subject: [PATCH] Implement mxIsScalar() for MATLAB < R2015a (8.5) --- mex/sources/dynmex.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mex/sources/dynmex.h b/mex/sources/dynmex.h index bac4a55e1..52a71bef5 100644 --- a/mex/sources/dynmex.h +++ b/mex/sources/dynmex.h @@ -1,5 +1,5 @@ /* - * Copyright © 2009-2014 Dynare Team + * Copyright © 2009-2019 Dynare Team * * This file is part of Dynare. * @@ -40,4 +40,8 @@ } while (0) #endif +#if defined(MATLAB_MEX_FILE) && MATLAB_VERSION < 0x0805 +# define mxIsScalar(x) (mxGetM(x) == 1 && mxGetN(x) == 1) +#endif + #endif