# ? Error using ==> mrdivide Matrix dimensions must agree

Hi everybody,

I absolutely need to find out the problem of my simulation for this weekend. Could you help me to fix it ?

Here is my model :

[code]// Declaration of variables
var c d k f r p V g;
varexo R;
parameters a wy wo V0;

// Calibration of parameters
a = 0.2;
wy = 8;
wo = 4;
V0=2;

// The model
model;
f = (1+R)k(-1)^a;
k = (d(+1) / (c * (1 + R)a))^(1 / (a-1));
k = wy - c - g
V;
d(+1) = wo + k * (1+r) + g
(V(+1) + p(+1));
V + p = (1+r) * V(-1);
d(+1) / c = (1+r);
p = f - (1+r) * k(-1);
c + d + k = wy + wo + f(-1);
end;

initval;
c = 4;
d = wo + V0;
k = 2;
g=1;
end;

check;

and the result :

[code]

dynare simulation_test1

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.

Starting Dynare …
Starting preprocessing of the model file …
8 equation(s) found
Processing derivation …
Processing Order 1… done
Processing Order 2… done
Processing outputs …
Preprocessing completed.
Starting Matlab computing …

??? Error using ==> mrdivide
Matrix dimensions must agree.

Error in ==> lnsrch1 at 64
alamin = tolx/test ;

Error in ==> solve1 at 126
[x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});

Error in ==> dynare_solve at 110
[x,info]=solve1(func,x,j1(r(i):r(i+1)-1),j2(r(i):r(i+1)-1),jacobian_flag,varargin{:});

Error in ==> resol at 75
[dr.ys,check1] =
dynare_solve(fh,dr.ys,options_.jacobian_flag,…

Error in ==> check at 48