diff --git a/matlab/reports/@graph/graph.m b/matlab/reports/@graph/graph.m index c1bb5c951..452281de3 100644 --- a/matlab/reports/@graph/graph.m +++ b/matlab/reports/@graph/graph.m @@ -77,13 +77,12 @@ elseif nargin > 1 % overwrite default values for pair = reshape(varargin, 2, []) - field = lower(pair{1}); - ind = strmatch(field, lower(optNames), 'exact'); + ind = strmatch(lower(pair{1}), lower(optNames), 'exact'); assert(isempty(ind) || length(ind) == 1); if ~isempty(ind) o.(optNames{ind}) = pair{2}; else - error('@graph.graph: %s is not a recognized option.', field); + error('@graph.graph: %s is not a recognized option.', pair{1}); end end end diff --git a/matlab/reports/@page/page.m b/matlab/reports/@page/page.m index 8e2b30526..b36adb1c5 100644 --- a/matlab/reports/@page/page.m +++ b/matlab/reports/@page/page.m @@ -52,13 +52,12 @@ elseif nargin > 1 % overwrite default values for pair = reshape(varargin, 2, []) - field = lower(pair{1}); - ind = strmatch(field, lower(optNames), 'exact'); + ind = strmatch(lower(pair{1}), lower(optNames), 'exact'); assert(isempty(ind) || length(ind) == 1); if ~isempty(ind) o.(optNames{ind}) = pair{2}; else - error('@page.page: %s is not a recognized option.', field); + error('@page.page: %s is not a recognized option.', pair{1}); end end end diff --git a/matlab/reports/@report/report.m b/matlab/reports/@report/report.m index 5e306c675..58c1634ed 100644 --- a/matlab/reports/@report/report.m +++ b/matlab/reports/@report/report.m @@ -58,14 +58,12 @@ elseif nargin > 1 % overwrite default values for pair = reshape(varargin, 2, []) - field = lower(pair{1}); - ind = strmatch(field, lower(optNames), 'exact'); + ind = strmatch(lower(pair{1}), lower(optNames), 'exact'); assert(isempty(ind) || length(ind) == 1); if ~isempty(ind) o.(optNames{ind}) = pair{2}; else - error('@report.report: %s is not a recognized option.', ... - field); + error('@report.report: %s is not a recognized option.', pair{1}); end end end diff --git a/matlab/reports/@section/section.m b/matlab/reports/@section/section.m index aca48b8c1..7e6bb0824 100644 --- a/matlab/reports/@section/section.m +++ b/matlab/reports/@section/section.m @@ -40,14 +40,12 @@ elseif nargin > 1 % overwrite default values for pair = reshape(varargin, 2, []) - field = lower(pair{1}); - ind = strmatch(field, lower(optNames), 'exact'); + ind = strmatch(lower(pair{1}), lower(optNames), 'exact'); assert(isempty(ind) || length(ind) == 1); if ~isempty(ind) o.(optNames{ind}) = pair{2}; else - error('@section.section: %s is not a recognized option.', ... - field); + error('@section.section: %s is not a recognized option.', pair{1}); end end end diff --git a/matlab/reports/@series/series.m b/matlab/reports/@series/series.m index 1ef0d424e..39b104d97 100644 --- a/matlab/reports/@series/series.m +++ b/matlab/reports/@series/series.m @@ -65,13 +65,12 @@ elseif nargin > 1 % overwrite default values for pair = reshape(varargin, 2, []) - field = lower(pair{1}); - ind = strmatch(field, lower(optNames), 'exact'); + ind = strmatch(lower(pair{1}), lower(optNames), 'exact'); assert(isempty(ind) || length(ind) == 1); if ~isempty(ind) o.(optNames{ind}) = pair{2}; else - error('@series.series: %s is not a recognized option.', field); + error('@series.series: %s is not a recognized option.', pair{1}); end end end diff --git a/matlab/reports/@table/table.m b/matlab/reports/@table/table.m index f24a75c88..e7247a61b 100644 --- a/matlab/reports/@table/table.m +++ b/matlab/reports/@table/table.m @@ -62,14 +62,12 @@ elseif nargin > 1 % overwrite default values for pair = reshape(varargin, 2, []) - field = lower(pair{1}); - ind = strmatch(field, lower(optNames), 'exact'); + ind = strmatch(lower(pair{1}), lower(optNames), 'exact'); assert(isempty(ind) || length(ind) == 1); if ~isempty(ind) o.(optNames{ind}) = pair{2}; else - error('%s is not a recognized option to the Table constructor.', ... - field); + error('%s is not a recognized option to the Table constructor.', pair{1}); end end end diff --git a/matlab/reports/@vspace/vspace.m b/matlab/reports/@vspace/vspace.m index 0af84127e..e61ca8149 100644 --- a/matlab/reports/@vspace/vspace.m +++ b/matlab/reports/@vspace/vspace.m @@ -48,13 +48,12 @@ elseif nargin > 1 % overwrite default values for pair = reshape(varargin, 2, []) - field = lower(pair{1}); - ind = strmatch(field, lower(optNames), 'exact'); + ind = strmatch(lower(pair{1}), lower(optNames), 'exact'); assert(isempty(ind) || length(ind) == 1); if ~isempty(ind) o.(optNames{ind}) = pair{2}; else - error('@vspace.vspace: %s is not a recognized option.', field); + error('@vspace.vspace: %s is not a recognized option.', pair{1}); end end end