This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
24 | for j = 1:length(fi) | 4 | 0.000 s | 28.2% |  |
23 | fi = fieldnames(bot); | 4 | 0.000 s | 23.9% |  |
30 | end | 4 | 0.000 s | 1.5% |  |
21 | assert(isscalar(top)); | 4 | 0.000 s | 0.1% |  |
22 | assert(isscalar(bot)); | 4 | 0.000 s | 0.0% |  |
All other lines | | | 0.000 s | 46.3% |  |
Totals | | | 0.000 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
No Code Analyzer messages.Coverage results
Show coverage for parent directory
Total lines in function | 12 |
Non-code lines (comments, blank lines) | 2 |
Code lines (lines that can run) | 10 |
Code lines that did run | 5 |
Code lines that did not run | 5 |
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.