This is a static copy of a profile report

Home

tabular.mergeArrayProps>mergeNonemptyScalarStructs (Calls: 4, Time: 0.000 s)
Generated 04-Jun-2021 04:11:26 using performance time.
subfunction in file C:\Program Files\MATLAB\R2020b\toolbox\matlab\datatypes\tabular\@tabular\mergeArrayProps.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
tabular.mergeArrayPropsfunction4
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
24
for j = 1:length(fi)
40.000 s28.2%
23
fi = fieldnames(bot);
40.000 s23.9%
30
end
40.000 s1.5%
21
assert(isscalar(top));
40.000 s0.1%
22
assert(isscalar(bot));
40.000 s0.0%
All other lines  0.000 s46.3%
Totals  0.000 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function12
Non-code lines (comments, blank lines)2
Code lines (lines that can run)10
Code lines that did run5
Code lines that did not run5
Coverage (did run/can run)50.00 %
Function listing
time 
Calls 
 line
  19 
function top = mergeNonemptyScalarStructs(top,bot)
  20 
% To select the topmost non-empty field from two structs
< 0.001 
      4 
  21
assert(isscalar(top)); 
< 0.001 
      4 
  22
assert(isscalar(bot)); 
< 0.001 
      4 
  23
fi = fieldnames(bot); 
< 0.001 
      4 
  24
for j = 1:length(fi) 
  25 
    fn = fi{j};
  26 
    if ~isfield(top,fn) || isempty(top.(fn))
  27 
        top.(fn) = bot.(fn);
  28 
    end
  29 
end
< 0.001 
      4 
  30
end 

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