fprint

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.

fprint

Postby rogerio » Sat Jul 16, 2016 12:35 pm

Hi
I have just installed Dynare 4.4.3 and running in Matlab R2015b. When I try to run dynare, for “example1”, I get the following error:

ERROR: Could not open file: example1.mod
Error using fprintf
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in dynare (line 168)
fprintf(fid, '%s', result);

Thanks.
rogerio
 
Posts: 2
Joined: Sat Jul 16, 2016 12:02 pm

Re: fprint

Postby jpfeifer » Sat Jul 16, 2016 12:52 pm

Dynare could not find the example1.mod in your case. Is it located in the current folder of Matlab?
------------
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: fprint

Postby rogerio » Sat Jul 16, 2016 1:51 pm

Hi,Yes, it is. If a try a non-existent file, for instance, exemplo1, the message is:
The file exemplo1.mod could not be located in the "Current Folder". Check whether you typed in the correct filename
and whether the file is really located in the "Current Folder".
rogerio
 
Posts: 2
Joined: Sat Jul 16, 2016 12:02 pm

Re: fprint

Postby jpfeifer » Sat Jul 16, 2016 2:34 pm

Could you please try in the same folder
Code: Select all
    logname='example1.log';
    fid = fopen(logname, 'w')

There seems to be some problem in opening the log-file for writing. In case example1.log already exists, please delete it. Do you have write permission in that folder?
------------
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


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests