% Matlab File: plotimperbsflexprices.m %Chapter 7 %CIA model with predetermined exchange rates %June 2007 %This program is part of the book "Open Economy Macroeconomics in %Developing Countries" (forthcoming MIT Press) by Carlos A. Vegh. Use of %this program or modifications thereof should be acknowledged by citing %this manuscript. This program is a modification of the original %King, Plosser, and Rebelo's (1988) programs. I am grateful to Guillermo %Vuletin for his help in writing this program. % This program is to be used after implmbs.m to plot impulse response functions % Order of variables is: % States, exogenous, co-states, controls, and flows % Date k epsilon lambda cT cN i e TB % 1 2 3 4 5 6 7 8 9 % Program was modified to include the zero value in period zero % in the plot %clg %time = 1:nir; time = 0:nir; [dim1 dim2]=size(IR); PIR = [zeros(1,dim2) IR]; figure(1) subplot(221), plot(time,PIR(:,3),'-',time,zeros(size(time)),'.') title('Rate of devaluation') xlabel('time') subplot(222), plot(time, PIR(:,5),time,zeros(size(time)),'.') title('Consumption of tradables') xlabel('time') subplot(223), plot(time,PIR(:,9),time,zeros(size(time)),'.') title('Trade balance') xlabel('time') subplot(224), plot(time, PIR(:,8),time,zeros(size(time)),'.') title('Real exhange rate') xlabel('time') clear time