comparison scripts/optimization/optimget.m @ 11407:ed827ffa5a43

optimset, optimget, __all_opts__: consistently use lower case for storing and searching options
author John W. Eaton <jwe@octave.org>
date Wed, 22 Dec 2010 04:16:01 -0500
parents 30f54b3b9953
children fd0a3ac60b0e
comparison
equal deleted inserted replaced
11406:a7e73f903ea6 11407:ed827ffa5a43
31 if (nargin < 2 || nargin > 4 || ! isstruct (options) || ! ischar (parname)) 31 if (nargin < 2 || nargin > 4 || ! isstruct (options) || ! ischar (parname))
32 print_usage (); 32 print_usage ();
33 endif 33 endif
34 34
35 opts = __all_opts__ (); 35 opts = __all_opts__ ();
36 idx = lookup (toupper(opts), toupper(parname), "m"); 36 idx = lookup (tolower (opts), tolower (parname), "m");
37 37
38 if (idx) 38 if (idx)
39 parname = opts{idx}; 39 parname = opts{idx};
40 else 40 else
41 warning ("unrecognized option: %s", parname); 41 warning ("unrecognized option: %s", parname);