Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t = 1:1:(500+2);
- t = t'; % Create the time vector for x-axis.
- g = t;
- g(2:502) = 1.1; % Specify the path of government expenditure.
- T = 500; % Spedcify the x-axis length.
- subplot(2,2,1)
- plot(t(1:500), g(1:500), 'r-')
- grid on; grid minor;
- axis([0 T 0.9 1.2])
- g_title = title('Government intervention vs. time');
- g_xlabel = xlabel('Time Period');
- g_ylabel = ylabel('Shock (from government), g');
- g_title.FontName = 'Segoe UI Semibold';
- g_title.FontSize = 12;
- g_title.FontWeight = 'bold';
- g_xlabel.FontName = 'Segoe UI Semibold';
- g_xlabel.FontSize = 11;
- g_xlabel.FontWeight = 'bold';
- g_ylabel.FontName = 'Segoe UI Semibold';
- g_ylabel.FontSize = 11;
- g_ylabel.FontWeight = 'bold';
- subplot(2,2,2)
- plot(t, k, 'r')
- grid on; grid minor;
- axis([0 T 37.5 39])
- k_title = title('Capital vs. time');
- k_xlabel = xlabel('Time Period');
- k_ylabel = ylabel('Capital, k');
- k_title.FontName = 'Segoe UI Semibold';
- k_title.FontSize = 12;
- k_title.FontWeight = 'bold';
- k_xlabel.FontName = 'Segoe UI Semibold';
- k_xlabel.FontSize = 11;
- k_xlabel.FontWeight = 'bold';
- k_ylabel.FontName = 'Segoe UI Semibold';
- k_ylabel.FontSize = 11;
- k_ylabel.FontWeight = 'bold';
- subplot(2,2,3)
- plot(t(1:500), c(1:500), 'r-')
- axis([0 T 1.62 1.8])
- grid on; grid minor;
- c_title = title('Consumption vs. time');
- c_xlabel = xlabel('Time Period');
- c_ylabel = ylabel('Consumption, c');
- c_title.FontName = 'Segoe UI Semibold';
- c_title.FontSize = 12;
- c_title.FontWeight = 'bold';
- c_xlabel.FontName = 'Segoe UI Semibold';
- c_xlabel.FontSize = 11;
- c_xlabel.FontWeight = 'bold';
- c_ylabel.FontName = 'Segoe UI Semibold';
- c_ylabel.FontSize = 11;
- c_ylabel.FontWeight = 'bold';
- subplot(2,2,4)
- plot(t, y, 'r')
- axis([0 T 3.7 3.74])
- y_title = title('Production vs. time');
- y_xlabel = xlabel('Time Period');
- y_ylabel = ylabel('Production, y');
- grid on; grid minor;
- y_title.FontName = 'Segoe UI Semibold';
- y_title.FontSize = 12;
- y_title.FontWeight = 'bold';
- y_xlabel.FontName = 'Segoe UI Semibold';
- y_xlabel.FontSize = 11;
- y_xlabel.FontWeight = 'bold';
- y_ylabel.FontName = 'Segoe UI Semibold';
- y_ylabel.FontSize = 11;
- y_ylabel.FontWeight = 'bold';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement