This is a static copy of a profile report

Home

Function details for mean>mysizeThis is a static copy of a profile report

Home

mean>mysize (Calls: 101, Time: 0.003 s)
Generated 03-Jul-2019 20:22:30 using performance time.
subfunction in file C:\Program Files\MATLAB\R2019a\toolbox\matlab\datafun\mean.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
meanfunction101
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
259
if isscalar(dim)
1010.001 s22.2%
260
s = size(x,dim);
1010.000 s13.6%
258
if isnumeric(dim) || islogical...
1010.000 s11.7%
271
end
1010.000 s10.3%
266
end
1010.000 s1.6%
All other lines  0.001 s40.5%
Totals  0.003 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function15
Non-code lines (comments, blank lines)2
Code lines (lines that can run)13
Code lines that did run6
Code lines that did not run7
Coverage (did run/can run)46.15 %
Function listing
time 
Calls 
 line
 257 
function s = mysize(x, dim)
< 0.001 
    101 
 258
if isnumeric(dim) || islogical(dim) 
< 0.001 
    101 
 259
    if isscalar(dim) 
< 0.001 
    101 
 260
        s = size(x,dim); 
 261 
    else
 262 
        s = size(x,dim(1));
 263 
        for i = 2:length(dim)
 264 
            s = s * size(x,dim(i));
 265 
        end
< 0.001 
    101 
 266
    end 
 267 
else
 268 
    s = numel(x);
< 0.001 
    101 
 269
end 
 270 

< 0.001 
    101 
 271
end