diff --git a/matlab/estimation/dsge_simulated_theoretical_correlation.m b/matlab/estimation/dsge_simulated_theoretical_correlation.m
index 9dc90c44e8f2077c2a5e9ce84621278bcb343ea5..5d2ed379d42a871f0049e17c43cdec37a5608424 100644
--- a/matlab/estimation/dsge_simulated_theoretical_correlation.m
+++ b/matlab/estimation/dsge_simulated_theoretical_correlation.m
@@ -35,8 +35,8 @@ function [nvar,vartan,CorrFileNumber] = dsge_simulated_theoretical_correlation(S
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <https://www.gnu.org/licenses/>.
 
+[ivar,vartan] = get_variables_list(options_, M_);
 nvar = length(ivar);
-[~,vartan] = get_variables_list(options_, M_);
 
 % Get informations about the _posterior_draws files.
 if strcmpi(type,'posterior')