This is a static copy of a profile reportHome
images/private/isresampler (1721 calls, 1.262 sec)
Generated 05-Nov-2014 07:52:59 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/images/images/private/isresampler.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 |
41 | q = (length(strmatch(R.padmeth... | 1721 | 0.991 s | 78.6% |  |
11 | q = isa(R,'struct') ... | 1721 | 0.090 s | 7.1% |  |
18 | q = (length(R) == 1); | 1721 | 0.050 s | 4.0% |  |
19 | end | 1721 | 0.030 s | 2.4% |  |
35 | if (q && R.ndims ~= In... | 1721 | 0.020 s | 1.6% |  |
All other lines | | | 0.080 s | 6.3% |  |
Totals | | | 1.262 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
cell.strmatch | function | 1721 | 0.951 s | 75.4% |  |
Self time (built-ins, overhead, etc.) | | | 0.310 s | 24.6% |  |
Totals | | | 1.262 s | 100% | |
Code Analyzer results
Line number | Message |
41 | STRMATCH will be removed in a future release. Replace STRMATCH(STR, STRARRAY, 'exact') with STRCMP(STR, STRARRAY). |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 43 |
Non-code lines (comments, blank lines) | 27 |
Code lines (lines that can run) | 16 |
Code lines that did run | 14 |
Code lines that did not run | 2 |
Coverage (did run/can run) | 87.50 % |
Function listing
time calls line
1 function q = isresampler(R)
2 %ISRESAMPLER True for valid resampling structure.
3 % ISRESAMPLER(R) returns 1 if R is a valid resampler struct, such as
4 % one created by MAKERESAMPLER, and 0 otherwise.
5 %
6 % See also MAKERESAMPLER.
7
8 % Copyright 1993-2003 The MathWorks, Inc.
9 % $Revision: 1.3.4.2 $ $Date: 2004/08/10 01:45:31 $
10
0.09 1721 11 q = isa(R,'struct') ...
12 & isfield(R,'ndims') ...
13 & isfield(R,'padmethod') ...
14 & isfield(R,'resamp_fcn') ...
15 & isfield(R,'rdata');
16
0.01 1721 17 if q
0.05 1721 18 q = (length(R) == 1);
0.03 1721 19 end
20
1721 21 if q
0.02 1721 22 q = ~isempty(R.ndims) ...
23 & ~isempty(R.resamp_fcn) ...
24 & ~isempty(R.padmethod);
0.02 1721 25 end
26
1721 27 if q
1721 28 q = isa(R.ndims,'double') ...
29 & length(R.ndims) == 1 ...
30 & isreal(R.ndims) ...
31 & isa(R.padmethod,'char') ...
32 & isa(R.resamp_fcn,'function_handle');
0.01 1721 33 end
34
0.02 1721 35 if (q && R.ndims ~= Inf)
36 q = R.ndims == floor(R.ndims) ...
37 & R.ndims >= 1;
38 end
39
1721 40 if q
0.99 1721 41 q = (length(strmatch(R.padmethod,...
42 {'fill','bound','replicate','circular','symmetric'},'exact')) == 1);
0.01 1721 43 end