Page 1 of 1

invalid input character

PostPosted: Fri Jul 08, 2011 9:08 pm
by jimmyk
I'm a brand new Dynare user, and have what is probably a pretty basic problem, but I searched the forum and didn't find an answer. When I run dynare on my simple program (invmod1.mod), some unrecognizable characters show up in the .mod file (just before the initval section), and I get the message below in Matlab. I can see the characters if I edit the .m file in Matlab, but I don't know how they get there. Any ideas? Thanks.

Starting MATLAB/Octave computing.

??? Error: File: invmod1.m Line: 140 Column: 1
The input character is not valid in MATLAB statements or expressions.

Error in ==> dynare at 132
evalin('base',fname) ;

Re: invalid input character

PostPosted: Sat Jul 09, 2011 12:35 pm
by jpfeifer
Directly before the model and the initval statements are some invisible control characters in the empty line. Delete them and the file runs. Probably your text-editor did not set a correct line carriage.

Re: invalid input character

PostPosted: Sat Jul 09, 2011 7:54 pm
by jimmyk
Thanks, I figured it had to be something like that, but I tried a bunch of different editors and none of them picked up the characters.

Re: invalid input character

PostPosted: Mon Aug 29, 2011 3:04 pm
by SébastienVillemot
We recommend to either use the built-in editor shipped with MATLAB (you can invoke it using the "edit" command), or to use a good text editor such as Emacs (available under Windows, Mac and Linux).

Best,