%   STEADST.M
%   Computes steady state value zs for the state vector of a recursive
%   dynamic equilibrium model.  The model has the form
%
%      x(t+1) = ao*x(t) + c*w(t+1)
%
%        y(t) = G*x(t)
%
%   where G=[sc;ss;si;sd;sb;sk;sh].
%   The user must specify both ao and "nnc", which
%   is the row number of the constant in the state vector x(t).
%   The steady state value of the state zs is proportional to
%   null(eye(max(size(ao)))-ao), which must be normalized so that
%   the nnc'th row equals unity.
%   To get steady state values of endogenous variables, e.g. c(t),
%   the program computes sc*zs.
%   There must be no unit endogenous eigenvalues, and only the
%   unit exogenous eigenvalue associated with the constant, for the
%   problem to be well posed.
nsize=max(size(ao));
e1=eye(nsize);
zz=null(e1-ao);
zs=zz./zz(nnc);
%   Compute steady state values of c,s,i,d,b,k,h.
sc*zs
ss*zs
si*zs
sd*zs
sb*zs
sk*zs
sh*zs
