Some of the parameter names (even very innocent ones) seem to be generating an error in my code. The attached code, for example, works just fine. But when I replace parameter name “theta” with a parameter name “lambda” (using Replace All function, I get 20 replacements), I get an error message saying that: “The input character is not valid in MATLAB statements or expressions”.
I can’t reproduce the problem. OP_model.mod works on my machine in Dynare version 3 and in version 4 under Windows. Under which operating system are you working? which Matlab version ?
The problem is with upper and lower case. For example, you can’t have v1 as a parameter and V1 as a variable. There is some inconsistency in the handling of upper and lower case in Dynare version 3. So you should be case consistent, but not rely on it to distinguish objects.