This is a static copy of a profile report

Home

verLessThan (4 calls, 0.000 sec)
Generated 14-Nov-2016 07:47:12 using cpu time.
function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/general/verLessThan.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
Load_size_infofunction4
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
55
result = toolboxParts(2) < ...
20 s0%
54
elseif toolboxParts(2) ~= verP...
20 s0%
53
result = toolboxParts(1) < ...
20 s0%
52
if toolboxParts(1) ~= verParts...
40 s0%
51
verParts = getParts(verstr);
40 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
verLessThan>getPartssubfunction40 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0 s0% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function58
Non-code lines (comments, blank lines)33
Code lines (lines that can run)25
Code lines that did run10
Code lines that did not run15
Coverage (did run/can run)40.00 %
Function listing
time 
calls 
 line
   1 
function result = verLessThan(toolboxstr, verstr)
   2 
%verLessThan Compare version of toolbox to specified version string.
   3 
%   verLessThan(TOOLBOX_DIR, VERSION) returns true if the version of
   4 
%   the toolbox specified by the string TOOLBOX_DIR is older than the
   5 
%   version specified by the string VERSION, and false otherwise. 
   6 
%   VERSION must be a string in the form 'major[.minor[.revision]]', 
   7 
%   such as '7', '7.1', or '7.0.1'. If TOOLBOX_DIR cannot be found
   8 
%   on MATLAB's search path, an error is generated.
   9 
%
  10 
%   Examples:
  11 
%       if verLessThan('images', '4.1')
  12 
%           error('Image Processing Toolbox 4.1 or higher is required.');
  13 
%       end
  14 
%
  15 
%       if verLessThan('matlab', '7.0.1')
  16 
%           % Put code to run under MATLAB older than MATLAB 7.0.1 here
  17 
%       else
  18 
%           % Put code to run under MATLAB 7.0.1 and newer here
  19 
%       end
  20 
%
  21 
%   See also MATLABPATH, VER.
  22 

  23 
% Copyright 2006-2014 The MathWorks, Inc.
  24 
           
      4 
  25 
if ~ischar(verstr) || ~ischar(toolboxstr) 
  26 
    error(message('MATLAB:verLessThan:invalidInput'))
  27 
end
  28 

  29 
% We cache the MATLAB version number for better performance.
      4 
  30 
persistent cachedMatlabVer; 
  31 

      4 
  32 
toolboxIsMatlab = strcmpi(toolboxstr,'matlab'); 
  33 

      4 
  34 
if toolboxIsMatlab && ~isempty(cachedMatlabVer) 
      4 
  35 
    toolboxParts = cachedMatlabVer; 
  36 
else
  37 
    % The requested product is not MATLAB, or the cached value is empty.
  38 
    toolboxver = ver(toolboxstr);
  39 
    if isempty(toolboxver)
  40 
        error(message('MATLAB:verLessThan:missingToolbox', toolboxstr))
  41 
    end
  42 

  43 
    toolboxParts = getParts(toolboxver(1).Version);
  44 
    
  45 
    % If the requested product is MATLAB, cache the version value.
  46 
    if toolboxIsMatlab
  47 
        cachedMatlabVer = toolboxParts;
  48 
    end
  49 
end
  50 

      4 
  51 
verParts = getParts(verstr); 
      4 
  52 
if toolboxParts(1) ~= verParts(1)     % major version 
      2 
  53 
    result = toolboxParts(1) < verParts(1); 
      2 
  54 
elseif toolboxParts(2) ~= verParts(2) % minor version 
      2 
  55 
    result = toolboxParts(2) < verParts(2); 
  56 
else                                  % revision version
  57 
    result = toolboxParts(3) < verParts(3);
  58 
end

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