Page 1 of 1

fprint

PostPosted: Sat Jul 16, 2016 12:35 pm
by rogerio
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.

Re: fprint

PostPosted: Sat Jul 16, 2016 12:52 pm
by jpfeifer
Dynare could not find the example1.mod in your case. Is it located in the current folder of Matlab?

Re: fprint

PostPosted: Sat Jul 16, 2016 1:51 pm
by rogerio
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".

Re: fprint

PostPosted: Sat Jul 16, 2016 2:34 pm
by jpfeifer
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?