diff --git a/matlab/dynare.m b/matlab/dynare.m index 026670af9fc4c2e6a03f49ae5fc3b3fa4fc7bf10..ac6f01ab0e4cffed6413c55588e19020c2e5e1b1 100644 --- a/matlab/dynare.m +++ b/matlab/dynare.m @@ -94,6 +94,10 @@ if ~ischar(fname) error('DYNARE: argument of dynare must be a text string') end +if ~isvarname(fname) + error('DYNARE: argument of dynare must conform to Matlab''s convention for naming functions, i.e. start with a letter and not contain special characters. Please rename your MOD-file.') +end + % Testing if file have extension % If no extension default .mod is added if isempty(strfind(fname,'.'))