This is a static copy of a profile report

Home

graphics/private/inputcheck>LocalCheckOption (40 calls, 0.022 sec)
Generated 05-Aug-2011 13:01:21 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/private/inputcheck.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
graphics/private/inputcheckfunction40
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
318
opIndex = strmatch( option, op...
400.011 s50.0%
353
end
400 s0%
348
end
400 s0%
335
opIndex = find(strcmp( 'r', op...
400 s0%
331
elseif option(1) == 'r'
400 s0%
All other lines  0.011 s50.0%
Totals  0.022 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
cell.strmatchfunction400.011 s50.0%
Self time (built-ins, overhead, etc.)  0.011 s50.0%
Totals  0.022 s100% 
Code Analyzer results
Line numberMessage
318STRMATCH will be removed in a future release. Use STRNCMP instead.
Coverage results
[ Show coverage for parent directory ]
Total lines in function51
Non-code lines (comments, blank lines)27
Code lines (lines that can run)24
Code lines that did run11
Code lines that did not run13
Coverage (did run/can run)45.83 %
Function listing
   time   calls  line
303 function opIndex = LocalCheckOption( op, options )
304 %LocalCheckOption Verify option given is supported, and only one is given.
305 % Option proper starts after '-'. Returns index into options cell array or errors.
306
307 %We already know first character is '-'
40 308 if ( size(op, 2) > 1 )
309
40 310 option = op(2:end);
311
312 %Is there one unique match?
40 313 opIndex = find(strcmp( option, options));
314
40 315 if length(opIndex) ~= 1
316
317 %Is there one partial match, i.e. -adobe
0.01 40 318 opIndex = strmatch( option, options );
319
40 320 if isempty(opIndex)
321
322 %Special case 1
40 323 if strcmp( option, 'epsi' )
324 %This was a grandfathered preview format. Tell the user s/he is
325 %using something no longer supported and give him/her the new
326 %and improved preview, TIFF.
327 warning( 'MATLAB:Print:format', 'EPSI preview format no longer supported. Using -tiff option.' )
328 opIndex = find(strcmp( 'tiff', options));
329
330 %Special case 2
40 331 elseif option(1) == 'r'
332 %Resolution switch. As given by user will have a number after it
333 %If there is nothing after it, it means to use screen resolution
334 %That case is caught in the first strmatch.
40 335 opIndex = find(strcmp( 'r', options));
336
337 elseif strncmp(option, 'pages[', 6)
338 %Pages range. User will supply the from/to page after the switch
339 opIndex = find(strcmp( 'pages', options));
340
341 else
342 error('MATLAB:Print:illOpt', 'Illegal option ''%s'' given.',op)
343 end
344
345 elseif length(opIndex) > 1
346 error( 'MATLAB:Print:option', 'Option ''%s''is not unique',op )
347 end
40 348 end
349 else
350 error( 'MATLAB:Print:expOpt', 'Expecting option to follow ''-''.' )
351 end
352 %EOFunction LocalCheckOption
40 353 end

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