Problem with running Dynare

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.

Problem with running Dynare

Postby nada » Tue Aug 16, 2016 6:17 am

Hello to all,

Please help me. When I try to run a mod file by typing 'dynare baseline241' in Matlab, an error message appears saying

'user_has_matlab_license' is not a defined function

dynare_config
if ~user_has_matlab_license('statistics_toolbox')

I am using Matlab R2016a with an academic use. Does anyone know what's the problem?
nada
 
Posts: 11
Joined: Tue Aug 16, 2016 6:10 am

Re: Problem with running Dynare

Postby jpfeifer » Tue Aug 16, 2016 7:33 am

That is strange. In Dynare's matlab subfolder, there should be a file
Code: Select all
user_has_matlab_license.m

Is is there?
------------
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: Problem with running Dynare

Postby nada » Tue Aug 16, 2016 8:16 am

Yes, there is 'user_has_matlab_license.m' file in dynare\4.4.3\matlab
nada
 
Posts: 11
Joined: Tue Aug 16, 2016 6:10 am

Re: Problem with running Dynare

Postby jpfeifer » Tue Aug 16, 2016 8:23 am

What does Matlab return when you type:
Code: Select all
which user_has_matlab_license

What is the reply to
Code: Select all
which dynare
------------
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: Problem with running Dynare

Postby nada » Tue Aug 16, 2016 8:26 am

The Matlab returns as follows:

>> which user_has_matlab_license
C:\dynare\4.4.3\matlab\user_has_matlab_license.m
>> which dynare
C:\dynare\4.4.3\matlab\dynare.m
nada
 
Posts: 11
Joined: Tue Aug 16, 2016 6:10 am

Re: Problem with running Dynare

Postby jpfeifer » Tue Aug 16, 2016 8:45 am

That is strange. So Matlab finds the correct Dynare installation and the function it claims it is missing. Have you tried reinstalling Dynare 4.4.3?
------------
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: Problem with running Dynare

Postby nada » Tue Aug 16, 2016 9:10 am

Yes, I also tried reinstalling Dynare.

The whole error message is as follows(My language is Korean):

'user_has_matlab_license'은(는) 정의되지 않은 함수 또는 변수입니다.

오류 발생: dynare_config (line 77)
if ~user_has_matlab_license('statistics_toolbox')

오류 발생: dynare (line 48)
dynareroot = dynare_config;

It says that 'user_has_matlab_license' is not defined and there is error in dynare_config
nada
 
Posts: 11
Joined: Tue Aug 16, 2016 6:10 am

Re: Problem with running Dynare

Postby jpfeifer » Tue Aug 16, 2016 10:12 am

Can you please try to just execute in Matlab
Code: Select all
user_has_matlab_license('statistics_toolbox')
------------
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: Problem with running Dynare

Postby nada » Tue Aug 16, 2016 10:22 am

user_has_matlab_license('statistics_toolbox')

ans =

1

This is strange...
nada
 
Posts: 11
Joined: Tue Aug 16, 2016 6:10 am

Re: Problem with running Dynare

Postby jpfeifer » Tue Aug 16, 2016 10:39 am

Are you always executing all commands in the same folder where the mod-file is located?
------------
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: Problem with running Dynare

Postby nada » Tue Aug 16, 2016 10:44 am

Yes all files are located in C:\dynare\4.4.3\matlab
nada
 
Posts: 11
Joined: Tue Aug 16, 2016 6:10 am

Re: Problem with running Dynare

Postby jpfeifer » Tue Aug 16, 2016 10:50 am

You are not supposed to put your mod-file in the Dynare matlab-folder. Have you tried what happens when you put it somewhere else?
------------
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: Problem with running Dynare

Postby nada » Tue Aug 16, 2016 10:58 am

I have newly downloaded example1.mod file from the tutorial section of www.dynare.org and placed it in C:\.

There's still the same error message

dynare example1
'user_has_matlab_license'은(는) 정의되지 않은 함수 또는 변수입니다.

오류 발생: dynare_config (line 77)
if ~user_has_matlab_license('statistics_toolbox')

오류 발생: dynare (line 48)
dynareroot = dynare_config;
nada
 
Posts: 11
Joined: Tue Aug 16, 2016 6:10 am

Re: Problem with running Dynare

Postby jpfeifer » Tue Aug 16, 2016 11:06 am

I have never encountered something like this before. Could you also put the user_has_matlab_license.m in the folder where the mod-file is located. And please reinstall Dynare after uninstalling and deleting the old Dynare folder. After executing mod-files within the Dynare installation folder there may be files created by the user left that are never deleted otherwise.
------------
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: Problem with running Dynare

Postby nada » Tue Aug 16, 2016 11:19 am

I've done what you said, but the same error still occurs.
I've tried commenting out all the lines that includes 'user_has_matlab_license', but now the same error occurs for 'matlab_ver_less_than'.
Then I've commented out all the lines that includes 'matlab_ver_less_than', but now the same error occurs for 'skipline'...
nada
 
Posts: 11
Joined: Tue Aug 16, 2016 6:10 am

Next

Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 8 guests