This is a static copy of a profile report

Home

title (Calls: 5, Time: 0.108 s)
Generated 18-May-2021 16:05:22 using performance time.
function in file /usr/local/MATLAB/R2021a/toolbox/matlab/graph2d/title.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
Koch_Kurvefunction5
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
80
h = get(ax,'Title');
50.089 s82.3%
27
isaxarr=matlab.graphics.chart....
50.007 s6.6%
38
[ax,args,nargs] = labelcheck('...
50.004 s3.5%
81
set(h, 'String', titlestr, pvp...
50.003 s2.8%
79
matlab.graphics.internal.markF...
50.001 s1.1%
All other lines  0.004 s3.5%
Totals  0.108 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...nteractions.createDefaultInteractionsclass method50.017 s16.1%
...ionContainer.TextInteractionContainerclass method50.006 s5.9%
objArrayDispatchfunction50.004 s3.5%
...ractions.createAndRegisterTextControlclass method50.002 s1.8%
graph2d/private/labelcheckfunction50.002 s1.7%
...t;ControlManager.sendPVPairsToControlclass method50.001 s1.1%
markFigurefunction50.001 s0.7%
convertStringToCharArgsfunction50.001 s0.7%
...;@(o,e)subplotlayoutInvalid(ax,e,fig)anonymous function40.000 s0.4%
Self time (built-ins, overhead, etc.)  0.074 s68.0%
Totals  0.108 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function100
Non-code lines (comments, blank lines)40
Code lines (lines that can run)60
Code lines that did run33
Code lines that did not run27
Coverage (did run/can run)55.00 %
Function listing
time 
Calls 
 line
   1 
function [hh,hhsub] = title(varargin)
   2 
%TITLE  Graph title.
   3 
%   TITLE('txt') adds the specified title to the axes or chart returned by
   4 
%   the gca command. Reissuing the title command causes the new title to 
   5 
%   replace the old title.
   6 
%
   7 
%   TITLE('txt','subtxt') adds a subtitle in addition to the title.
   8 
%
   9 
%   TITLE(...,'Property1',PropertyValue1,'Property2',PropertyValue2,...)
  10 
%   sets the values of the specified properties of the title, and subtitle
  11 
%   if specified.
  12 
%
  13 
%   TITLE(target,...) adds the title to the specified target object.
  14 
%
  15 
%   H = TITLE(...) returns the handle to the text object used as the title.
  16 
%
  17 
%   See also XLABEL, YLABEL, ZLABEL, TEXT, SUBTITLE.
  18 

  19 
%   Copyright 1984-2020 The MathWorks, Inc.
  20 

  21 
% if the input has a title property which is a text object, use it to set
  22 
% the title on.
  23 

< 0.001 
      5 
  24
if nargout>0 
  25 
    [isaxarr,hh]=matlab.graphics.chart.internal.objArrayDispatch(@title,varargin{:});
< 0.001 
      5 
  26
else 
  0.007 
      5 
  27
    isaxarr=matlab.graphics.chart.internal.objArrayDispatch(@title,varargin{:}); 
< 0.001 
      5 
  28
end 
< 0.001 
      5 
  29
if isaxarr 
  30 
    % Warn when an array of targets and a second output argument
  31 
    if nargout>1
  32 
        hhsub=[];
  33 
        warning(message('MATLAB:title:MultiOutputMultiTarget'))
  34 
    end
  35 
    return
< 0.001 
      5 
  36
end 
  37 

  0.004 
      5 
  38
[ax,args,nargs] = labelcheck('Title',varargin); 
  39 

< 0.001 
      5 
  40
if nargs == 0  
  41 
  error(message('MATLAB:title:InvalidNumberOfInputs'))
< 0.001 
      5 
  42
end 
  43 

< 0.001 
      5 
  44
if isempty(ax) 
< 0.001 
      5 
  45
    ax = gca; 
  46 
    % Chart subclass support
  47 
    % Invoke title method with same number of outputs to defer output arg
  48 
    % error handling to the method.
< 0.001 
      5 
  49
    if isa(ax,'matlab.graphics.chart.Chart') 
  50 
        if(nargout == 1)
  51 
            hh = title(ax,args{:});
  52 
        else
  53 
            title(ax,args{:});
  54 
        end
  55 
        return
< 0.001 
      5 
  56
    end 
< 0.001 
      5 
  57
end 
  58 

< 0.001 
      5 
  59
dosubtitle=false; 
< 0.001 
      5 
  60
if (nargs > 1 && (rem(nargs-1,2) ~= 0)) 
  61 
    subtitlestr=string(args{2});
  62 
    args(2)=[];
  63 
    dosubtitle=true;
< 0.001 
      5 
  64
end 
  65 

< 0.001 
      5 
  66
titlestr = args{1}; 
< 0.001 
      5 
  67
if isempty(titlestr), titlestr=''; end 
< 0.001 
      5 
  68
pvpairs = args(2:end); 
  69 

  70 
% get-set does not support strings as of now
  0.001 
      5 
  71
pvpairs = matlab.graphics.internal.convertStringToCharArgs(pvpairs); 
  72 

  73 
%---Check for bypass option
< 0.001 
      5 
  74
if isappdata(ax,'MWBYPASS_title')        
  75 
   h = mwbypass(ax,'MWBYPASS_title',titlestr,pvpairs{:});
  76 

  77 
%---Standard behavior      
< 0.001 
      5 
  78
else 
  0.001 
      5 
  79
   matlab.graphics.internal.markFigure(ax); 
  0.089 
      5 
  80
   h = get(ax,'Title'); 
  0.003 
      5 
  81
   set(h, 'String', titlestr, pvpairs{:}); 
  82 
   
< 0.001 
      5 
  83
    if dosubtitle && isprop(ax,'Subtitle') 
  84 
        hSub = get(ax,'Subtitle');
  85 
        set(hSub, 'String', subtitlestr, pvpairs{:});
< 0.001 
      5 
  86
    end 
< 0.001 
      5 
  87
end 
  88 

< 0.001 
      5 
  89
if nargout > 0 
  90 
  hh = h;
< 0.001 
      5 
  91
end 
< 0.001 
      5 
  92
if nargout > 1  
  93 
    if exist('hSub','var')
  94 
        hhsub=hSub;
  95 
    elseif isprop(ax,'Subtitle')
  96 
        hhsub=get(ax,'Subtitle');
  97 
    else
  98 
        hhsub=[];
  99 
    end
< 0.001 
      5 
 100
end 

Other subfunctions in this file are not included in this listing.