This is a static copy of a profile reportHome
funfun/private/optimoptioncheckfield>stringsType (1720 calls, 0.044 sec)
Generated 05-Aug-2011 13:03:54 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/funfun/private/optimoptioncheckfield.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 |
257 | valid = ischar(value) &&a... | 1720 | 0.033 s | 75.0% |  |
268 | end | 1720 | 0 s | 0% |  |
267 | errmsg = ''; | 1720 | 0 s | 0% |  |
266 | errid = ''; | 1720 | 0 s | 0% |  |
265 | else | 1720 | 0 s | 0% |  |
All other lines | | | 0.011 s | 25.0% |  |
Totals | | | 0.044 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 14 |
Non-code lines (comments, blank lines) | 5 |
Code lines (lines that can run) | 9 |
Code lines that did run | 6 |
Code lines that did not run | 3 |
Coverage (did run/can run) | 66.67 % |
Function listing
time calls line
255 function [valid, errmsg, errid] = stringsType(field,value,strings)
256 % One of the strings in cell array strings
0.03 1720 257 valid = ischar(value) && any(strcmp(value,strings));
258
1720 259 if ~valid
260 % Format strings for error message
261 allstrings = formatCellArrayOfStrings(strings);
262
263 errid = 'optimlib:optimoptioncheckfield:stringsType:notAStringsType';
264 errmsg = sprintf('Invalid value for OPTIONS parameter %s:\n must be %s.',field, allstrings);
1720 265 else
1720 266 errid = '';
1720 267 errmsg = '';
1720 268 end
Other subfunctions in this file are not included in this listing.