From 2569a0e259c7cfab8e62f677a56edd25445c0cf2 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Mon, 19 May 2014 17:49:52 +0200
Subject: [PATCH] reporting: remove instances of deprecated function strmatch

---
 matlab/reports/@graph/graph.m                 | 2 +-
 matlab/reports/@page/page.m                   | 2 +-
 matlab/reports/@report/report.m               | 2 +-
 matlab/reports/@report_series/report_series.m | 2 +-
 matlab/reports/@report_table/report_table.m   | 2 +-
 matlab/reports/@section/section.m             | 2 +-
 matlab/reports/@vspace/vspace.m               | 4 ++--
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/matlab/reports/@graph/graph.m b/matlab/reports/@graph/graph.m
index 5852884bee..d2f1da55d8 100644
--- a/matlab/reports/@graph/graph.m
+++ b/matlab/reports/@graph/graph.m
@@ -90,7 +90,7 @@ elseif nargin > 1
 
     % overwrite default values
     for pair = reshape(varargin, 2, [])
-        ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
+        ind = find(strcmpi(optNames, pair{1}));
         assert(isempty(ind) || length(ind) == 1);
         if ~isempty(ind)
             o.(optNames{ind}) = pair{2};
diff --git a/matlab/reports/@page/page.m b/matlab/reports/@page/page.m
index 7bcc26c5d7..99442c777a 100644
--- a/matlab/reports/@page/page.m
+++ b/matlab/reports/@page/page.m
@@ -53,7 +53,7 @@ elseif nargin > 1
 
     % overwrite default values
     for pair = reshape(varargin, 2, [])
-        ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
+        ind = find(strcmpi(optNames, pair{1}));
         assert(isempty(ind) || length(ind) == 1);
         if ~isempty(ind)
             o.(optNames{ind}) = pair{2};
diff --git a/matlab/reports/@report/report.m b/matlab/reports/@report/report.m
index 4aabeb5a8b..07340f9c49 100644
--- a/matlab/reports/@report/report.m
+++ b/matlab/reports/@report/report.m
@@ -57,7 +57,7 @@ elseif nargin > 1
 
     % overwrite default values
     for pair = reshape(varargin, 2, [])
-        ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
+        ind = find(strcmpi(optNames, pair{1}));
         assert(isempty(ind) || length(ind) == 1);
         if ~isempty(ind)
             o.(optNames{ind}) = pair{2};
diff --git a/matlab/reports/@report_series/report_series.m b/matlab/reports/@report_series/report_series.m
index 4d3e6287ac..611277686e 100644
--- a/matlab/reports/@report_series/report_series.m
+++ b/matlab/reports/@report_series/report_series.m
@@ -78,7 +78,7 @@ elseif nargin > 1
 
     % overwrite default values
     for pair = reshape(varargin, 2, [])
-        ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
+        ind = find(strcmpi(optNames, pair{1}));
         assert(isempty(ind) || length(ind) == 1);
         if ~isempty(ind)
             o.(optNames{ind}) = pair{2};
diff --git a/matlab/reports/@report_table/report_table.m b/matlab/reports/@report_table/report_table.m
index c49ca5fb66..8f922f1eb6 100644
--- a/matlab/reports/@report_table/report_table.m
+++ b/matlab/reports/@report_table/report_table.m
@@ -65,7 +65,7 @@ elseif nargin > 1
 
     % overwrite default values
     for pair = reshape(varargin, 2, [])
-        ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
+        ind = find(strcmpi(optNames, pair{1}));
         assert(isempty(ind) || length(ind) == 1);
         if ~isempty(ind)
             o.(optNames{ind}) = pair{2};
diff --git a/matlab/reports/@section/section.m b/matlab/reports/@section/section.m
index 4b756de7f3..5042d94d06 100644
--- a/matlab/reports/@section/section.m
+++ b/matlab/reports/@section/section.m
@@ -40,7 +40,7 @@ elseif nargin > 1
 
     % overwrite default values
     for pair = reshape(varargin, 2, [])
-        ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
+        ind = find(strcmpi(optNames, pair{1}));
         assert(isempty(ind) || length(ind) == 1);
         if ~isempty(ind)
             o.(optNames{ind}) = pair{2};
diff --git a/matlab/reports/@vspace/vspace.m b/matlab/reports/@vspace/vspace.m
index e61ca8149b..a3aa809daf 100644
--- a/matlab/reports/@vspace/vspace.m
+++ b/matlab/reports/@vspace/vspace.m
@@ -12,7 +12,7 @@ function o = vspace(varargin)
 % SPECIAL REQUIREMENTS
 %   none
 
-% Copyright (C) 2013 Dynare Team
+% Copyright (C) 2013-2014 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -48,7 +48,7 @@ elseif nargin > 1
 
     % overwrite default values
     for pair = reshape(varargin, 2, [])
-        ind = strmatch(lower(pair{1}), lower(optNames), 'exact');
+        ind = find(strcmpi(optNames, pair{1}));
         assert(isempty(ind) || length(ind) == 1);
         if ~isempty(ind)
             o.(optNames{ind}) = pair{2};
-- 
GitLab