www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/xregModelViewer.m
function hFig = xregModelViewer(m, varargin) %XREGMODELVIEWER Display the model description figure % % HFIG = XREGMODELVIEWER(M, VARARGIN) creates a window to display the model % description. The window is created by calling the view method of the % model M and passing in all additional arguments. % % HFIG = XREGMODELVIEWER([], TEXT) displays an empty model description % window that contains just the string TEXT. % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. if ~isempty(m) hFig = view(m, varargin{:}); else hFig = mvf('ModelViewer'); if isempty(hFig) % Need to create a model viewer using a dummy model hFig = view(xregmodel('nfactors', 1)); end hView = get(hFig, 'UserData'); hView.Model = []; if nargin>1 hView.EmptyDisplayString = varargin{1}; end end