Dear All!
I tried to do what you suggested. But my model is not working.
I received the following error:
Error using copyfile
Cannot write to destination: C:\Users\abdel\Documents. Use the 'f' option to override.
Error in testcom (line 12)
copyfile('S1.mat','S3.mat')
Please take a look at what I did.
dynare thesimyp1.mod;
irf1 = oo_.irfs;
S1 = 'thesimyp1';
save S1.mat S1
dynare thesimyp2.mod;
irf2 = oo_.irfs;
S2 = 'thesimyp2';
save S2.mat S2
copyfile('S1.mat','S3.mat')
S = load('S2.mat');
save('S3.mat','-struct','S','-append')
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(S)
subplot(3,3,jj)
irf1.([S{1,jj},ending_cell{1,ii}]);
irf2.([S{1,jj},ending_cell{1,ii}]);
hold on
plot(HOR,[(['irf1.' S{1,jj},ending_cell{1,ii}])],'-k',HOR,[(['irf2.' S{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
Best regards.

댓글 수: 2

Image Analyst
Image Analyst 2021년 4월 2일
Did you do what it suggested? Use the f option?
Star Strider
Star Strider 2021년 4월 2일
For anyone curious (those like me who wondered about the dynare call), the Dynare website.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Animation에 대해 자세히 알아보기

질문:

2021년 4월 1일

댓글:

2021년 4월 2일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by