Page 1 of 2
Problem with running Dynare
Posted:
Tue Aug 16, 2016 6:17 am
by nada
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?
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 7:33 am
by jpfeifer
That is strange. In Dynare's matlab subfolder, there should be a file
- Code: Select all
user_has_matlab_license.m
Is is there?
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 8:16 am
by nada
Yes, there is 'user_has_matlab_license.m' file in dynare\4.4.3\matlab
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 8:23 am
by jpfeifer
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
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 8:26 am
by nada
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
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 8:45 am
by jpfeifer
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?
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 9:10 am
by nada
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
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 10:12 am
by jpfeifer
Can you please try to just execute in Matlab
- Code: Select all
user_has_matlab_license('statistics_toolbox')
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 10:22 am
by nada
user_has_matlab_license('statistics_toolbox')
ans =
1
This is strange...
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 10:39 am
by jpfeifer
Are you always executing all commands in the same folder where the mod-file is located?
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 10:44 am
by nada
Yes all files are located in C:\dynare\4.4.3\matlab
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 10:50 am
by jpfeifer
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?
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 10:58 am
by nada
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;
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 11:06 am
by jpfeifer
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.
Re: Problem with running Dynare
Posted:
Tue Aug 16, 2016 11:19 am
by nada
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'...