Replace name in the graphic
显示 更早的评论
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 个评论
Walter Roberson
2021-3-28
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Operator Replacement 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!