This is a static copy of a profile reportHome
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 Name | Function Type | Calls |
imformats | function | 84 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
533 | match(p) = any(strcmp(key, in(... | 1596 | 0.011 s | 50.0% |  |
531 | match = false(1,length(in)); | 84 | 0.011 s | 50.0% |  |
544 | end | 80 | 0 s | 0% |  |
543 | out = in(match); | 80 | 0 s | 0% |  |
541 | case 1 | 80 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.022 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
533 | Use STRCMPI(str1,str2) instead of using UPPER/LOWER in a call to STRCMP. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 27 |
Non-code lines (comments, blank lines) | 13 |
Code lines (lines that can run) | 14 |
Code lines that did run | 12 |
Code lines that did not run | 2 |
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.