This is a static copy of a profile reportHome
iptutils\private\iptcheckprefname (3 calls, 0.000 sec)
Generated 15-Mar-2007 12:02:02 using real time.
M-function in file C:\Program Files\MATLAB71\toolbox\images\iptutils\private\iptcheckprefname.m
[Copy to new window for comparing multiple runs]
Parents (calling functions)
Function Name | Function Type | Calls |
iptgetpref | M-function | 3 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
14 | matchIdx = []; | 3 | 0.000 s | 69.2% |  |
15 | actualPrefName = prefName; | 3 | 0.000 s | 27.0% |  |
16 | len = length(prefName); | 3 | 0.000 s | 3.5% |  |
11 | replacedPref = false; | 3 | 0.000 s | 0.2% |  |
12 | obsoletePref = false; | 3 | 0.000 s | 0.2% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.000 s | 100% | |
Children (called functions)
No childrenM-Lint results
No M-Lint messages.Coverage results
[ Show coverage for parent directory ]
Total lines in file | 57 |
Non-code lines (comments, blank lines) | 18 |
Code lines (lines that can run) | 39 |
Code lines that did run | 16 |
Code lines that did not run | 23 |
Coverage (did run/can run) | 41.03 % |
Function listing
time calls line
1 function matchIdx = iptcheckprefname(prefName, allNames)
2 % IPTCHECKPREFNAME Checks the preference name passed to IPTSETPREF and
3 % IPTGETPREF.
4 % It errors if there are no matches or if the the preference name is
5 % ambiguous. It will also warn if an obsolete preference name is
6 % used.
7
8 % Copyright 2004 The MathWorks, Inc.
9 % $Revision: 1.1.8.1 $ $Date: 2005/05/27 14:07:51 $
10
< 0.01 3 11 replacedPref = false;
< 0.01 3 12 obsoletePref = false;
13
< 0.01 3 14 matchIdx = [];
< 0.01 3 15 actualPrefName = prefName;
< 0.01 3 16 len = length(prefName);
3 17 for k = 1:length(allNames)
15 18 tmpName = allNames{k};
15 19 if ~isempty(tmpName{1}) && strncmpi(prefName, tmpName{1}, len)
3 20 matchIdx = [matchIdx, k];
3 21 actualPrefName = tmpName{1};
12 22 elseif (length(tmpName)==2) && strncmpi(prefName, tmpName{2}, len)
23 matchIdx = [matchIdx, k];
24 if isempty(tmpName{1})
25 obsoletePref = true;
26 else
27 replacedPref = true;
28 end
29 actualPrefName = tmpName{2};
30 end
15 31 end
32
3 33 if (isempty(matchIdx))
34 eid = sprintf('Images:%s:unknownPreference',mfilename);
35 msg = sprintf('Unknown Image Processing Toolbox preference "%s".', ...
36 actualPrefName);
37 error(eid,'%s',msg);
3 38 elseif (length(matchIdx) > 1)
39 eid = sprintf('Images:%s:ambiguousPreference',mfilename);
40 msg = sprintf('Ambiguous Image Processing Toolbox preference "%s".', ...
41 actualPrefName);
42 error(eid,'%s',msg);
43 end
44
3 45 if replacedPref
46 warnid = sprintf('Images:%s:obsoletePreference',mfilename);
47 msg = sprintf('"%s" is an obsolete preference. Use %s instead.',...
48 actualPrefName, allNames{matchIdx}{1});
49 warning(warnid,'%s',msg);
50 end
51
3 52 if obsoletePref
53 warnid = sprintf('Images:%s:obsoletePreference',mfilename);
54 msg = sprintf('"%s" is an obsolete preference. ',...
55 actualPrefName);
56 warning(warnid,'%s',msg);
57 end