invalid input character

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

invalid input character

Postby jimmyk » Fri Jul 08, 2011 9:08 pm

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) ;
Attachments
invmod1.m
(5.38 KiB) Downloaded 200 times
invmod1.mod
(909 Bytes) Downloaded 208 times
jimmyk
 
Posts: 20
Joined: Fri Jul 08, 2011 8:58 pm

Re: invalid input character

Postby jpfeifer » Sat Jul 09, 2011 12:35 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: invalid input character

Postby jimmyk » Sat Jul 09, 2011 7:54 pm

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.
jimmyk
 
Posts: 20
Joined: Fri Jul 08, 2011 8:58 pm

Re: invalid input character

Postby SébastienVillemot » Mon Aug 29, 2011 3:04 pm

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,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests