function mfname=getmfth(eta)
%GETMFTH Gets the name of the .m-file that defines the model structure
%
%	MFNAME = getmfth(TH)
%
%	TH: The model structure defined in the THETA-format (See help theta)
%	MFNAME: The name of the m-file that defines the structure

%	L. Ljung 10-2-90
%	Copyright (c) 1990 by the MathWorks, Inc.
%	All Rights Reserved.

if ~isthss(eta),error('This is not a state-space based model!'),end
[nr,nc]=size(eta);
if eta(2,8)<4, mfname='ssmodx9';return,end
sspm=eta(1,8:nc);
sspm=sspm(1:max(find(sspm~=0)));
mfname=setstr(sspm);
