This is a static copy of a profile report

Home

imformats>find_in_registry (Calls: 20, Time: 0.004 s)
Generated 16-Jul-2020 17:09:38 using performance time.
subfunction in file /Applications/MATLAB_R2020a.app/toolbox/matlab/imagesci/imformats.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imformatsfunction20
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
528
match(p) = any(strcmpi(key, in...
3800.002 s44.9%
538
out = in(match);
200.001 s12.6%
529
end
3800.000 s11.1%
522
validateattributes(key,{'char'...
200.000 s9.1%
526
match = false(1,length(in));
200.000 s6.5%
All other lines  0.001 s15.7%
Totals  0.004 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function21
Non-code lines (comments, blank lines)10
Code lines (lines that can run)11
Code lines that did run10
Code lines that did not run1
Coverage (did run/can run)90.91 %
Function listing
time 
Calls 
 line
 519 
function [out, match] = find_in_registry(in, key)
 520 
%FIND_IN_REGISTRY  Find a particular format given
 521 

< 0.001 
     20 
 522
validateattributes(key,{'char', 'string'},{'nonempty','scalartext'},'','KEY'); 
 523 

 524 

 525 
% Look for the input format in the formats registry
< 0.001 
     20 
 526
match = false(1,length(in)); 
< 0.001 
     20 
 527
for p = 1:length(in) 
  0.002 
    380 
 528
    match(p) = any(strcmpi(key, in(p).ext)); 
< 0.001 
    380 
 529
end 
 530 

 531 
% Check whether the format was found
< 0.001 
     20 
 532
switch (sum(match)) 
< 0.001 
     20 
 533
case 0 
 534 
    % Not found.
 535 
    out = struct([]);
< 0.001 
     20 
 536
case 1 
 537 
    % One match found.
< 0.001 
     20 
 538
    out = in(match); 
< 0.001 
     20 
 539
end 

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