This is a static copy of a profile report

Home

Function details for imagescThis is a static copy of a profile report

Home

imagesc (Calls: 2, Time: 0.049 s)
Generated 01-May-2020 20:23:09 using performance time.
function in file /Applications/MATLAB_R2018a.app/toolbox/matlab/specgraph/imagesc.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
OC3function2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
21
hh = image(varargin{:},'CDataM...
20.045 s91.8%
49
set(cax,'CLimMode','auto')
20.002 s3.2%
48
elseif any(strcmpi(cax.NextPlo...
20.001 s2.7%
44
cax = ancestor(hh,'axes');
20.001 s1.0%
20
case 3
20.000 s0.5%
All other lines  0.000 s0.8%
Totals  0.049 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
newplotfunction20.041 s83.5%
Self time (built-ins, overhead, etc.)  0.008 s16.5%
Totals  0.049 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function54
Non-code lines (comments, blank lines)19
Code lines (lines that can run)35
Code lines that did run13
Code lines that did not run22
Coverage (did run/can run)37.14 %
Function listing
time 
Calls 
 line
   1 
function h = imagesc(varargin)
   2 
%IMAGESC Display image with scaled colors
   3 
%   IMAGESC(...) is the same as IMAGE(...) except the data is scaled
   4 
%   to use the full colormap.
   5 
%   
   6 
%   IMAGESC(...,CLIM) where CLIM = [CLOW CHIGH] can specify the
   7 
%   scaling.
   8 
%
   9 
%   See also IMSHOW, IMAGE, COLORBAR, IMREAD, IMWRITE.
  10 

  11 
%   Copyright 1984-2017 The MathWorks, Inc.
  12 

  13 
import matlab.graphics.internal.*;
< 0.001 
      2 
  14
clim = []; 
< 0.001 
      2 
  15
switch (nargin) 
< 0.001 
      2 
  16
  case 0 
  17 
    hh = image('CDataMapping','scaled');
< 0.001 
      2 
  18
  case 1 
  19 
    hh = image(varargin{1},'CDataMapping','scaled');
< 0.001 
      2 
  20
  case 3 
  0.045 
      2 
  21
    hh = image(varargin{:},'CDataMapping','scaled'); 
  22 
  otherwise
  23 

  24 
    % Determine if last input is clim
  25 
    if isequal(size(varargin{end}),[1 2])
  26 
      str = false(length(varargin),1);
  27 
      for n=1:length(varargin)
  28 
        str(n) = isCharOrString(varargin{n});
  29 
      end
  30 
      str = find(str);
  31 
      if isempty(str) || (rem(length(varargin)-min(str),2)==0)
  32 
        clim = varargin{end};
  33 
        varargin(end) = []; % Remove last cell
  34 
      else
  35 
        clim = [];
  36 
      end
  37 
    else
  38 
      clim = [];
  39 
    end
  40 
    hh = image(varargin{:},'CDataMapping','scaled');
< 0.001 
      2 
  41
end 
  42 

  43 
% Get the parent Axes of the image
< 0.001 
      2 
  44
cax = ancestor(hh,'axes'); 
  45 

< 0.001 
      2 
  46
if ~isempty(clim) 
  47 
  set(cax,'CLim',clim)
  0.001 
      2 
  48
elseif any(strcmpi(cax.NextPlot,{'replaceall','replace'})) 
  0.002 
      2 
  49
  set(cax,'CLimMode','auto') 
< 0.001 
      2 
  50
end 
  51 

< 0.001 
      2 
  52
if nargout > 0 
  53 
    h = hh;
  54 
end

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