Using fsolve within a filename_steadystate.m file

I am writing a filename_steadystate.m file following the example NK_baseline_steadystate.m.
I have a number of steady states where I do not have a closed form solution.
So within the filename_steadystate.m file I will use fsolve to solve for a number of steady states
(a subset of ys) where I do not have a closed form solution.
This will be done with a function in another file, say, F.m.

What is the best way to pass the parameter names and values to this F.m file?
The examples in the forum seem reassign parameter values within this file.
Yet the parameter values are already in the .mod file.

What exactly do you mean with

The usual structure of steady state files reads in all parameter values in an eval statement so that they can be called with their name.

I understand that “The usual structure of steady state files reads in all parameter values in an eval statement so that they can be called with their name.”

In the steady state file I will use another file that will use fsolve (to solve for some steady state values that do not have a closed form solution). How do you pass parameters to this file? Would you use a global command?

What I meant by
“examples in the forum seem reassign parameter values within this file.
Yet the parameter values are already in the .mod file.”.

One sets a parameter value in the .mod file. E.g. gamma = 2;
This is passed on to the steady state file in an eval statement.

However in the other .m file that uses fsolve the parameter values are entered again in the examples I have seen in this forum, e.g. gamma = 2; is entered again.

Surely you could pass these parameter values to this file without having to enter them again. That is only enter them once in the .mod file. I do not know how to do this.

I hope that I have made myself clear.

Thanks for your advice.

See e.g.