This is a static copy of a profile report

Home

imformats>find_in_registry (84 calls, 0.022 sec)
Generated 05-Aug-2011 13:01:18 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/imagesci/imformats.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imformatsfunction84
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
533
match(p) = any(strcmp(key, in(...
15960.011 s50.0%
531
match = false(1,length(in));
840.011 s50.0%
544
end
800 s0%
543
out = in(match);
800 s0%
541
case 1
800 s0%
All other lines  0 s0%
Totals  0.022 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
533Use STRCMPI(str1,str2) instead of using UPPER/LOWER in a call to STRCMP.
Coverage results
[ Show coverage for parent directory ]
Total lines in function27
Non-code lines (comments, blank lines)13
Code lines (lines that can run)14
Code lines that did run12
Code lines that did not run2
Coverage (did run/can run)85.71 %
Function listing
   time   calls  line
518 function [out, match] = find_in_registry(in, key)
519 %FIND_IN_REGISTRY Find a particular format given
520
521 % Verify that key is a single, 1-D character array
84 522 if ((~ischar(key)) || (isempty(key)) || (size(key, 2) ~= numel(key)))
523 error('MATLAB:imformats:formatNotCharVector', ...
524 'Format specifier must be a 1-D character array.')
525 end
526
527 % Convert key to lowercase
84 528 key = lower(key);
529
530 % Look for the input format in the formats registry
0.01 84 531 match = false(1,length(in));
84 532 for p = 1:length(in)
0.01 1596 533 match(p) = any(strcmp(key, in(p).ext));
1596 534 end
535
536 % Check whether the format was found
84 537 switch (sum(match))
84 538 case 0
539 % Not found.
4 540 out = struct([]);
80 541 case 1
542 % One match found.
80 543 out = in(match);
80 544 end

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