Hi all,

I am having problem with calling fsolve command in the steady-state file using Dynare. My model is a New-Keynesian model for calculating fiscal-multiplier. First, I have written a matlab file for calibrating the model (calibration_test.m ). In that file I use fsolve command (associated file consumption_trial.m), which works fine. Then I have written a mod file (kenynesian_fiscal_mult.mod) and the associated steady state file. In the steady state file, I try to use fsolve command (associated file consumption.m which is the same as consumption_trial.m). However, I get following error message

Preprocessing completed.

Error using ^

Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To perform

elementwise matrix powers, use ‘.^’.

Error in consumption (line 4)

cnrhat = x(2).^((eepsilon-1)/eepsilon)+ oomega*cgbar^((eepsilon-1)/eepsilon);

Error in fsolve (line 242)

fuser = feval(funfcn{3},x,varargin{:});

Error in keynes_fiscal_mult_steadystate (line 70)

x= fsolve(@consumption, xx0, options, wh, kg, l_v, kfp_v, s, ig, Vp, Vw);

I do not understand why I having this problem. Any help will be great!

Thanks

Ramaniconsumption.m (986 Bytes) keynes_fiscal_mult_steadystate.m (4.0 KB) calibration_test.m (3.9 KB) consumption_trial.m (1006 Bytes)

Keynes_fiscal_mult.mod (4.9 KB)