This is a static copy of a profile report

Home

graphics/private/inputcheck>LocalCheckDevice (6 calls, 0.000 sec)
Generated 14-Nov-2016 07:47:16 using cpu time.
subfunction in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/graphics/private/inputcheck.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
graphics/private/inputcheckfunction6
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
294
end
60 s0%
263
pj.Driver = cur_arg(3:end);
60 s0%
262
if length(devIndex) == 1
60 s0%
261
devIndex = find(strcmp( cur_ar...
60 s0%
258
if ( length(cur_arg) > 2 )
60 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
268STRMATCH is not recommended. Use STRNCMP or VALIDATESTRING instead.
Coverage results
Show coverage for parent directory
Total lines in function43
Non-code lines (comments, blank lines)17
Code lines (lines that can run)26
Code lines that did run5
Code lines that did not run21
Coverage (did run/can run)19.23 %
Function listing
time 
calls 
 line
 252 
function [ pj, devIndex ] = LocalCheckDevice( pj, cur_arg, devices )
 253 
%LocalCheckDevice Verify device given is supported, and only one is given.
 254 
%    device proper starts after '-d', if only '-d'
 255 
%    we will later echo out possible choices
 256 

 257 
%We already know first two characters are '-d'
      6 
 258 
if ( length(cur_arg) > 2 ) 
 259 

 260 
    %Is there one unique match?
      6 
 261 
    devIndex = find(strcmp( cur_arg(3:end), devices)); 
      6 
 262 
    if length(devIndex) == 1 
      6 
 263 
        pj.Driver = cur_arg(3:end); 
 264 

 265 
    else
 266 
        %Is there one partial match, i.e. -dtiffn[ocompression]
 267 
        %todo how to do partial matches with strcmp?
 268 
        devIndex = strmatch( cur_arg(3:end), devices ); 
 269 
        if length( devIndex ) == 1
 270 
            %Save the full name
 271 
            pj.Driver = devices{devIndex};
 272 

 273 
        elseif length( devIndex ) > 1
 274 
            error(message('MATLAB:print:NonUniqueDeviceOption', cur_arg))
 275 

 276 
        else
 277 
            % A special case, -djpegnn, where nn == quality level
 278 
            if strncmp( cur_arg, '-djpeg', 6 )
 279 
                if isempty( str2num(cur_arg(7:end)) ) %#ok
 280 
                    error(message('MATLAB:print:JPEGQualityLevel'));
 281 
                end
 282 
                %We want to keep quality level in device name.
 283 
                pj.Driver = cur_arg(3:end);
 284 
                devIndex = find(strcmp('jpeg',devices));
 285 
            else
 286 
                error(message('MATLAB:print:InvalidDeviceOption', cur_arg));
 287 
            end
 288 
        end
 289 
    end
 290 
else
 291 
    devIndex = 0;
 292 
end
 293 
%EOFunction LocalCheckDevice
      6 
 294 
end 

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