www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcmodel/@model/display.m
function display(obj) %DISPLAY Display an mbcmodel.model object % % DISPLAY(OBJ) is called for the object OBJ when the semicolon is not used % to terminate a statement. % % See also mbcmodel.model. % Copyright 2006 The MathWorks, Inc. % get the spacing right if isequal( get( 0, 'FormatSpacing' ), 'compact' ), blankline = ''; else blankline = ' '; end % Display variable name disp( blankline ); fprintf( '%s =\n', inputname(1) ); disp( blankline ); if numel( obj ) == 1, % "Scalar" obejct display % Display the xregmodel modelString = char( obj.Object, false ); b = blanks( size( modelString, 1 ) ).'; disp( [b, b, b, modelString] ) % Display some info about the data fprintf( ' InputData: [%dx%d double]\n', size( obj.XData ) ); fprintf( ' OutputData: [%dx%d double]\n', size( obj.YData ) ); % Give the user the staus of the model if obj.IsBeingEdited, fprintf( ' Status: Being Edited\n' ); else fprintf( ' Status: %s\n', obj.Status ); end % Is this model linked to a response? hResponse = obj.Response; if isempty(hResponse) || ~ishandle(hResponse) || hResponse.isNull fprintf( ' Linked to Response: <not linked>\n' ); else fprintf( ' Linked to Response: %s\n', hResponse.Name ); end else fprintf( ' [%d Models]\n', numel( obj ) ) end disp( blankline );