Error in my steady state file

Hi professor
I have a nonlinear DSGE model, when i use steady state block in dynare file, there is no problem and all residuals are zero. But when i use Steady state.m file of my model, There are many problems and nearly residuals of more than 70% of my equations are nonzero. would you please check my code?
Best regardsa13980529.mod (19.1 KB) a13980529_steadystate.m (3.4 KB)

Why do you want to use a steady state file if your steady_state_model-block already works? And why are the two so different in terms of equations?

Hi Professor
My real model is a nonlinear one and i need to find its solution by fsolve function. This model, that i sent here is a simplified one and i only want to check how fsolve function work.
Excuse me, I dont understand what you mean by the equations are so different. Would you please give me an example?
Best regards

I see, so the two files are different models. Do you want to solve a reduced system later on? Because calling fsolve on the full model is equivalent to having Dynare solve for the steady state numerically.

Excuse me professor I have a question
If by calling fsolve on the model, everything become ok and model give an answer, is it necessary to solve a reduce system?
In my full model, i make simplified assumption about the steady state value of some variables. but dynare sensitivity analysis give an error. I use fsolve function to simultaneously find steady state values, and wish everything become ok!
Best regards

Excuse me Professor
is it possible to use only fsolve function in steadystate_file.m to find the results? or should find the equations for steady state values of variables according to model equations and if it is necessary use an auxiliary function, like fsolve? (like NK_baseline_steadystate.m in dynare example)

Yes, you should try to reduce the dimensionality of the problem and only call fsolve on a simplified problem. Compute the steady state analytically wherever possible, i.e. for as many variables as possible. The NK_baseline_steadystate.m is a good example.