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.

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

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) ; bertha_fx.mod (2.79 KB)

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)