I done my model in nonliear form

## but when i try to run it ,but it has some error

Warning: Divide by zero.

In yoyo at 252

In dynare at 120

Warning: Divide by zero.

In yoyo at 271

In dynare at 120

Warning: Divide by zero.

In yoyo_static at 38

In dynare_solve at 84

In steady_ at 120

In steady at 54

In yoyo at 292

In dynare at 120

Warning: Divide by zero.

In yoyo_static at 103

In dynare_solve at 84

In steady_ at 120

In steady at 54

In yoyo at 292

In dynare at 120

Warning: Divide by zero.

In yoyo_static at 238

In dynare_solve at 84

In steady_ at 120

In steady at 54

In yoyo at 292

In dynare at 120

Warning: Divide by zero.

In yoyo_static at 240

In dynare_solve at 84

In steady_ at 120

In steady at 54

In yoyo at 292

In dynare at 120

Warning: Divide by zero.

In yoyo_static at 241

In dynare_solve at 84

In steady_ at 120

In steady at 54

In yoyo at 292

In dynare at 120

Warning: Divide by zero.

In yoyo_static at 246

In dynare_solve at 84

In steady_ at 120

In steady at 54

In yoyo at 292

In dynare at 120

Warning: Divide by zero.

In yoyo_static at 248

In dynare_solve at 84

In steady_ at 120

In steady at 54

In yoyo at 292

In dynare at 120

STEADY: numerical initial values incompatible with the following equations

Columns 1 through 17

```
3 4 5 6 7 8 9 10 11 12 13 18 19 20 21 22 23
```

Columns 18 through 20

```
24 25 26
```

??? Error using ==> dynare_solve at 96

exiting …

Error in ==> steady_ at 120

[oo_.steady_state,check] = dynare_solve([M_.fname ‘_static’],…

Error in ==> steady at 54

steady_;

Error in ==> yoyo at 292

steady;

Error in ==> dynare at 120

evalin(‘base’,fname) ;

I find someone say maybe the initval value is wrong

then i use the steady state value solve by hand to plug in

some i can’t solve i set by myself

but i t’s still wrong…

please tell me how to solve it … thank you for your help!

yoyo.mod (3.91 KB)

In your steady state computation, you have

```
omds= (2.0*v + 2.0*(mu*v - 2.0*v - 1.0*mu*v^2 + v^2 + 1.0)^(1/2) - 2.0)/(mu*v);
v=(1+omds*(1-bet^(2)*gam-0.5*mu)+omds^(2)*(0.5*bet^(2)*gam-0.5));
```

omds uses v, but v is only computed in the next line and cannot be used before.

## Really really thanks to you !!~~jpfeifer~~

I solve the problem!^^!

but now I get some new problem

dynare yoyo1.mod

Configuring Dynare …

[mex] Generalized QZ.

[mex] Sylvester equation solution.

[mex] Kronecker products.

[mex] Sparse kronecker products.

[mex] Bytecode evaluation.

[mex] k-order perturbation solver.

[mex] k-order solution simulation.

Starting Dynare (version 4.2.5).

Starting preprocessing of the model file …

Found 37 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: Divide by zero.

In yoyo1_static at 19

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 22

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 29

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 30

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 36

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 39

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 46

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 48

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 49

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 51

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 54

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 56

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 61

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 92

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 95

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 100

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 131

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 133

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Divide by zero.

In yoyo1_static at 134

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Log of zero.

In yoyo1_static at 157

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Log of zero.

In yoyo1_static at 158

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Log of zero.

In yoyo1_static at 160

In resid at 87

In yoyo1 at 244

In dynare at 120

Warning: Log of zero.

In yoyo1_static at 161

In resid at 87

In yoyo1 at 244

In dynare at 120

Residuals of the static equations:

Equation number 1 : -Inf

Equation number 2 : NaN

Equation number 3 : NaN

Equation number 4 : -1.1429

Equation number 5 : 0

Equation number 6 : 0

Equation number 7 : NaN

Equation number 8 : NaN

Equation number 9 : NaN

Equation number 10 : NaN

Equation number 11 : NaN

Equation number 12 : 0

Equation number 13 : NaN

Equation number 14 : -Inf

Equation number 15 : NaN

Equation number 16 : NaN

Equation number 17 : -1.1429

Equation number 18 : 0

Equation number 19 : 0

Equation number 20 : NaN

Equation number 21 : NaN

Equation number 22 : NaN

Equation number 23 : NaN

Equation number 24 : NaN

Equation number 25 : 0

Equation number 26 : NaN

Equation number 27 : NaN

Equation number 28 : -1

Equation number 29 : -1

Equation number 30 : -1

Equation number 31 : -1

Equation number 32 : 0

Equation number 33 : 0

Equation number 34 : 0

Equation number 35 : NaN

Equation number 36 : NaN

Equation number 37 : 0

??? Error using ==> steady_ at 132

STEADY: convergence problems

Error in ==> steady at 54

steady_;

Error in ==> yoyo1 at 293

steady;

## Error in ==> dynare at 120

evalin(‘base’,fname) ;

why there all NaN and INF QQ…?

matlab say divide by zere and log of zero

but I don’t know which equation is?

could you teach me how to solve it?

Thanks for your help!

Best YOYO

They are numbered as they appear in the model. Provide better starting values in the initval-block.