This is a static copy of a profile report

Home

view>ViewCore (Calls: 2, Time: 0.005 s)
Generated 16-Jul-2020 17:10:01 using performance time.
subfunction in file /Applications/MATLAB_R2020a.app/toolbox/matlab/graph3d/view.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
viewfunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
115
matlab.graphics.internal.markF...
20.003 s49.6%
153
if hasCameraProperties(handle(...
20.001 s14.3%
197
set(hAxes, 'View', [azIn, elIn...
20.001 s10.4%
150
case 3
20.000 s4.5%
196
if ~isempty(azIn) && ~...
20.000 s4.4%
All other lines  0.001 s16.7%
Totals  0.005 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
markFigurefunction20.002 s42.4%
Self time (built-ins, overhead, etc.)  0.003 s57.6%
Totals  0.005 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function86
Non-code lines (comments, blank lines)36
Code lines (lines that can run)50
Code lines that did run20
Code lines that did not run30
Coverage (did run/can run)40.00 %
Function listing
time 
Calls 
 line
 113 
function ViewCore(hAxes, arg1, arg2)
 114 

  0.003 
      2 
 115
matlab.graphics.internal.markFigure(hAxes); 
 116 

< 0.001 
      2 
 117
azIn     = []; 
< 0.001 
      2 
 118
elIn     = []; 
 119 

< 0.001 
      2 
 120
switch (nargin) 
 121 

 122 
  %
 123 
  %--------------------------------------------------------
 124 
  % 2 arg - cases are:
 125 
  %   view(hAxes, 2)
 126 
  %   view(hAxes, 3)
 127 
  %   view(hAxes, [az, el])
 128 
  %   view(hAxes, [x y z])
 129 
  %
< 0.001 
      2 
 130
 case 2 
< 0.001 
      2 
 131
  [r, c] = size(arg1); 
< 0.001 
      2 
 132
  if (r == 1) && (c == 1) 
 133 
    %
 134 
    % view(2) or view(3)
 135 
    %
< 0.001 
      2 
 136
    switch arg1 
< 0.001 
      2 
 137
     case 2 
 138 
      azIn = 0;
 139 
      elIn = 90;
 140 
      if hasCameraProperties(handle(hAxes))
 141 
          if ~strcmpi(get(hAxes,'CameraUpVectorMode'),'auto')
 142 
              if strcmpi(get(hAxes,'YDir'),'normal')
 143 
                  set(hAxes,'CameraUpVector',[0 1 0]);
 144 
              else
 145 
                  set(hAxes,'CameraUpVector',[0 -1 0]);
 146 
              end
 147 
          end
 148 
      end
 149 

< 0.001 
      2 
 150
     case 3 
< 0.001 
      2 
 151
      azIn = -37.5; 
< 0.001 
      2 
 152
      elIn = 30; 
< 0.001 
      2 
 153
      if hasCameraProperties(handle(hAxes)) && ~strcmpi(get(hAxes,'CameraUpVectorMode'),'auto') 
 154 
          set(hAxes,'CameraUpVector',[0 0 1]);
< 0.001 
      2 
 155
      end 
 156 
      
 157 
     otherwise
 158 
      error(message('MATLAB:view:InvalidScalarArgument'));
< 0.001 
      2 
 159
    end 
 160 
  elseif (r == 1) && (c == 2)
 161 
    %
 162 
    % view([az, el]
 163 
    %
 164 
    azIn = arg1(1);
 165 
    elIn = arg1(2);
 166 
  elseif r*c == 3
 167 
    %
 168 
    % view([x, y, z])
 169 
    %
 170 
    unit = arg1/norm(arg1);
 171 
    azIn = atan2(unit(1),-unit(2))*180/pi;
 172 
    elIn = atan2(unit(3),sqrt(unit(1)^2+unit(2)^2))*180/pi;
 173 
  else
 174 
    error(message('MATLAB:view:InvalidArgument'));
< 0.001 
      2 
 175
  end 
 176 

 177 
  %
 178 
  %--------------------------------------------------------
 179 
  % 3 args - cases are
 180 
  %   view(hAxes, az, el)
 181 
  %
 182 
 case 3
 183 
  if (length(arg1) == 1) && (length(arg2) == 1)
 184 
    azIn = arg1;
 185 
    elIn = arg2;
 186 
  else
 187 
    error(message('MATLAB:view:InvalidArgumentType'))
 188 
    
 189 
  end
 190 

< 0.001 
      2 
 191
end 
 192 

 193 
% there is one  case at this point:
 194 
%  The azimuth and elevation are defined
 195 

< 0.001 
      2 
 196
if ~isempty(azIn) && ~isempty(elIn) 
< 0.001 
      2 
 197
    set(hAxes, 'View', [azIn, elIn]); 
< 0.001 
      2 
 198
end 

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