Matlab function with several inputs!

Hi!

in order to solve the steady state for my model I have some non-linear equations. In this case 3 nonlinear equations. This implies that my Matlab function needs 3 input variables and will return 3 output variables once it’s done. But the problem is that the steady state block won’t except a vector, only integers.

In the example below I have

x2=[1;0.99;1.3];
x=fixa_micro(x2,delta,delta_e,a,beta,alpha,omega,PHI,mc);
n=x(1);
h=x(2);
k=x(3);

Then Dynare complains both about that “x2” is a vector and that x is a vector. So what should I do to solve this problem?

My steady state block in my mod-file looks like this

steady_state_model;
mu=0;
hiring=0;
mc=(betatheta+eta-1)/eta;
x2=[1;0.99;1.3];
x=fixa_micro(x2,delta,delta_e,a,beta,alpha,omega,PHI,mc);
n=x(1);
h=x(2);
k=x(3);
e=(1-h)/delta_e;
y_firm=(e^a)
((alphak^((omega-1)/omega)+(1-alpha)(hn)^((omega-1)/omega))^(omega/(omega-1))-PHI);
w=(1-alpha)
(h^((omega-1)/omega))mc(((y_firm+(e^a)PHI)/n)^(1/omega));
p_ss=(beta
alpha/(1-beta*(1-delta)))mc((y_firm+(e^a)PHI)/k)^(1/omega);
p=p_ss;
p_firm=p_ss;
productivity=y_firm/n;
investment=delta
k;
mu_e=(abeta/(1-beta(1-delta_e)))mc(y_firm/e);
w_ss=w;
D=1;

\\Glm

Please provide me with the full file.

Hi!

I’ve attached the modfile as well as the Matlab files that solves the non-linear steady state variables.

\Glm
fixa_micro.m (1.11 KB)
Johannes.mod (6.56 KB)

Please provide all files. I think the parametrar_funktion.m is missing.