Replace name in the graphic
Show older comments
Hi Everyone!
I would like to replace the names for this graphic with another name. For example, replace rdp with GDP, tx_inf with TAX.... I thank you very much for your help.

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'};
%'rdp', 'tx_infl', 't_cres', 'tax_jrn', 'h_prod'
for ii=1:length(ending_cell)
HOR=1:options_.irf;
var={'rdp', 'tx_infl', 't_cres', 'tax_jrn', 'h_prod'};
figure
for jj=1:length(var)
subplot(3,3,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{1,jj}] )
end
legend('thesimy', 'thesimy2', 'AutoUpdate','off')
end
1 Comment
Walter Roberson
on 28 Mar 2021
Accepted Answer
More Answers (0)
Categories
Find more on Operator Replacement in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!