see.m

来自「optimization toolbox」· M 代码 · 共 41 行

M
41
字号
function see(X,showfull)
%SEE Displays internal structure of variable
%
%    Shows the base matrices that build up the variable
%  
%    X = X0+x_1*X1+x_2*X2+...
%  
%    SEE(X)            Display matrices Xi in dense format
%    SEE(X,'sparse')   Display matrices Xi in sparse format
%
%    See also   SDPVAR

% Author Johan L鰂berg
% $Id: see.m,v 1.2 2004/07/02 08:17:32 johanl Exp $

disp(' ');
if nargin==1  
    disp('Constant matrix');disp(' ')
    disp(full(X))
    disp('Base matrices');disp(' ')
    disp('[]')
    disp(' ')			
    disp('Used variables');disp(' ')
    disp('[]')
else	
    switch showfull
        case 'sparse'
            disp('Constant matrix');disp(' ')
            disp((X))
            disp('Base matrices');disp(' ')
            disp('[]')
            disp(' ')			
            disp('Used variables');disp(' ')
            disp('[]')
            
        case 'full'
            see(X)
        otherwise
            error('Second argument should be ''sparse'' or ''full')
    end
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?