Dear everyone!
I am comparing two models and I get the following error:
Not enough input arguments.
Error in var (line 73)
if isinteger(x)
Error in compa_4 (line 21)
for jj=1:length(var)
My code is:
dynare thesimy.mod;
irf1 = oo_.irfs;
save thesimy.mat irf1;
dynare thesimy2.mod;
irf2 = oo_.irfs;
save thesimy2.mat irf2;
load(‘thesimy.mat’,‘irf1’);
load(‘thesimy2.mat’,‘irf2’);
ending_cell={’_eps_a’,’_eps_r’,’_eps_g’,‘eps_tau’};
%‘Hiato do produto’, ‘Inflação Doméstico’, ‘Consumo Doméstico’,
%‘PIB’,‘Inflação IP’,‘Termo de Troca’, ‘Salário Real’, ‘Horas de
%Trabalho’,‘Dívida’,‘Câmbio Nominal’,‘Balanço Comercial’,‘Taxa de Juros Real’
for ii=1:length(ending_cell)
HOR=1:options.irf;
var_titles = {‘Hiato do produto’, ‘Inflação Doméstico’, ‘Consumo Doméstico’, ‘PIB’, ‘Inflação IPC’, ‘Termo de Troca’, ‘Salário Real’, ‘Horas de Trabalho’,‘Dívida’, ‘Câmbio Nominal’,‘Balanço Comercial’,‘Taxa de Juros Real’};
figure
for jj=1:length(var)
subplot(4,4,jj)
eval([‘irf1.’ var{1,jj},ending_cell{1,ii}]);
eval([‘irf2.’ var{1,jj},ending_cell{1,ii}]);
hold on
plot(HOR,[eval([‘irf1.’ var{1,jj},ending_cell{1,ii}])],’-k’,HOR,[eval([‘irf2.’ var{1,jj},ending_cell{1,ii}])],’–r’,‘LineWidth’,2);
title([var_titles{1,jj}] )
end
legend(‘Modelo com HP’, ‘Modelo com TC’, ‘AutoUpdate’,‘off’)
end
Var is a function and var_titles is a variable.
When I put some variables (a small number of variables, 5 variables for example) in var_titles (1, 2, …5), the model executes normally without any problem. But when I put a lot of variables (12 variables for example ) in var_titles(1, 2, 3 …12), the model shows the above problem.
Thank you for helping to resolve the issue.