This is a static copy of a profile report

Home

strjust (Calls: 56, Time: 0.010 s)
Generated 16-Jul-2020 17:09:46 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/strfun/strjust.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
num2str>strvrcatsubfunction56
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
22
t = strjustOnChar(s, justify);
560.009 s91.2%
21
if ischar(s) || isnumeric(s)
560.000 s3.0%
15
if nargin<2
560.000 s1.6%
36
end
560.000 s0.2%
16
justify = 'right'; 
560.000 s0.1%
All other lines  0.000 s3.8%
Totals  0.010 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
strjust>strjustOnCharsubfunction560.008 s85.4%
Self time (built-ins, overhead, etc.)  0.001 s14.6%
Totals  0.010 s100% 
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function36
Non-code lines (comments, blank lines)15
Code lines (lines that can run)21
Code lines that did run7
Code lines that did not run14
Coverage (did run/can run)33.33 %
Function listing
time 
Calls 
 line
   1 
function t = strjust(s,justify)
   2 
%STRJUST Justify character array.
   3 
%   T = STRJUST(S) or T = STRJUST(S,'right') returns a right justified 
   4 
%   version of S.  S can be a character array, string array, or cell array
   5 
%   of character arrays.
   6 
%
   7 
%   T = STRJUST(S,'left') returns a left justified version of S.
   8 
%
   9 
%   T = STRJUST(S,'center') returns a center justified version of S.
  10 
%
  11 
%   See also DEBLANK, STRTRIM.
  12 

  13 
%   Copyright 1984-2016 The MathWorks, Inc.
  14 

< 0.001 
     56 
  15
    if nargin<2 
< 0.001 
     56 
  16
        justify = 'right';  
  17 
    else
  18 
        justify = lower(justify);
< 0.001 
     56 
  19
    end 
  20 

< 0.001 
     56 
  21
    if ischar(s) || isnumeric(s) 
  0.009 
     56 
  22
        t = strjustOnChar(s, justify); 
  23 
    elseif iscellstr(s) || isstring(s)
  24 
        t = s;
  25 
        num = numel(s);
  26 
        for i = 1:num
  27 
            textArray = s{i};
  28 
            if ~ischar(textArray)
  29 
                error(message('MATLAB:strjust:InputMustBeText'));
  30 
            end
  31 
            t{i} = strjustOnChar(textArray, justify);
  32 
        end
  33 
    else
  34 
        error(message('MATLAB:strjust:InputMustBeText'));
< 0.001 
     56 
  35
    end 
< 0.001 
     56 
  36
end 

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