Page 1 of 1

Undefined function 'MATLAB' for input arguments of type 'cha

PostPosted: Tue Nov 12, 2013 11:27 am
by bert827
I am new to dynare and matlab and am trying to run a NKDSGE model with foreign exchange constraints and I found this error
/applications/dynare/4.33/matlab/ >dynare Foreign
Configuring Dynare...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse Kronecker products.
[mex] Local state space iteration (second order).
[mex] Byte-code evaluation.
[mex] K-order perturbation solver.
[mex] K-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.
Starting Dynare (version 4.33).
Starting preprocessing of the model file...
Substitution of endo lags >=2: added 1 auxiliary variables and equations.
Found 36 equation(s).
Evaluating expressions...done.
Computing static model derivatives.
-order 1
Computing dynamic model derivatives.
-order 1
-order 2
Processing outputs...done
Preprocessing completed.
Starting MATLAB/Octave computing.

Undefined function 'MATLAB' for input argument of type 'char'.

Error in Foreign (line 269) MATLAB 5.0 MAT-file, Platform:MACI64, created on: Sat Oct 5 07:29:38 2013
Error in dynare (line 120) evalin('base',fname);

I don't know how to proceed and don't know what to do from here. Please help. I use macbook and am able to run my lecturers tute so am not sure if it's something to do with installation or it's just my mod file.

Re: Undefined function 'MATLAB' for input arguments of type

PostPosted: Wed Nov 13, 2013 12:55 pm
by jpfeifer
Please post the mod-file.

Re: Undefined function 'MATLAB' for input arguments of type

PostPosted: Thu Nov 21, 2013 8:31 am
by bert827
Hi jpfeifer,
I managed to work around the above problem and after I have worked around it and adjusted a few things in the model, I now have an error of "Matrix is singular to working precision". Please find below my mod file.
I always appreciate your assistance and time and hoping to get assisted.
Bertha

EDU>> dynare bertha_fx;

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Starting Dynare (version 4.3.3).
Starting preprocessing of the model file ...
Found 26 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.

Warning: Matrix is singular to working precision.
> In evaluate_steady_state at 76
In steady_ at 54
In steady at 81
In bertha_fx at 314
In dynare at 120




Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0
Equation number 9 : -3
Equation number 10 : -7.7419
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0
Equation number 19 : 0
Equation number 20 : 0
Equation number 21 : 0
Equation number 22 : 0
Equation number 23 : 0
Equation number 24 : 0
Equation number 25 : 0
Equation number 26 : 0


Error using print_info (line 63)
The steady state contains NaN or Inf

Error in steady (line 92)
print_info(info,options_.noprint);

Error in bertha_fx (line 314)
steady;

Error in dynare (line 120)
evalin('base',fname) ;

Re: Undefined function 'MATLAB' for input arguments of type

PostPosted: Thu Nov 21, 2013 4:21 pm
by jpfeifer
Put
Code: Select all
resid(1);

before steady to see that there are two problematic equations that do not seem to be linear.

Re: Undefined function 'MATLAB' for input arguments of type

PostPosted: Fri Nov 22, 2013 5:35 am
by bert827
Hi,
I wrote the code you suggested before steady but the error still comes up. Is there anything else I can do?
Thanks
Bertha

Re: Undefined function 'MATLAB' for input arguments of type

PostPosted: Fri Nov 22, 2013 7:05 am
by jpfeifer
You say your model is linear. In this case, all steady states are . But using 0 as the steady state, equations 9 and 10 do not solve. Consequently, there is a mistake in those equations (unless they are still linear and the constant part is not 0)

Re: Undefined function 'MATLAB' for input arguments of type

PostPosted: Mon Nov 25, 2013 2:57 pm
by bert827
Thanks very much, I sorted it out.