This is a static copy of a profile report

Home

imformats>find_in_registry (12977 calls, 6.299 sec)
Generated 05-Nov-2014 07:52:35 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/matlab/imagesci/imformats.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imformatsfunction12977
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
521
match(p) = any(strcmp(key, in(...
2465633.505 s55.6%
522
end
2465631.112 s17.6%
519
match = false(1,length(in));
129770.300 s4.8%
531
out = in(match);
129770.280 s4.5%
520
for p = 1:length(in)
129770.240 s3.8%
All other lines  0.861 s13.7%
Totals  6.299 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
521Use STRCMPI(str1,str2) instead of using UPPER/LOWER in a call to STRCMP.
Coverage results
[ Show coverage for parent directory ]
Total lines in function26
Non-code lines (comments, blank lines)12
Code lines (lines that can run)14
Code lines that did run11
Code lines that did not run3
Coverage (did run/can run)78.57 %
Function listing
   time   calls  line
507 function [out, match] = find_in_registry(in, key)
508 %FIND_IN_REGISTRY Find a particular format given
509
510 % Verify that key is a single, 1-D character array
0.07 12977 511 if ((~ischar(key)) || (isempty(key)) || (size(key, 2) ~= numel(key)))
512 error(message('MATLAB:imagesci:imformats:formatNotCharVector'))
513 end
514
515 % Convert key to lowercase
0.09 12977 516 key = lower(key);
517
518 % Look for the input format in the formats registry
0.30 12977 519 match = false(1,length(in));
0.24 12977 520 for p = 1:length(in)
3.50 246563 521 match(p) = any(strcmp(key, in(p).ext));
1.11 246563 522 end
523
524 % Check whether the format was found
0.21 12977 525 switch (sum(match))
0.05 12977 526 case 0
527 % Not found.
528 out = struct([]);
0.03 12977 529 case 1
530 % One match found.
0.28 12977 531 out = in(match);
0.15 12977 532 end

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