clear all close all d = dbload('cz_quarterly.csv'); rng = get(d.gdp,'range'); % renaming of the variables d.cons = d.cons_hh; d.invest = d.cap_form_total; d.gov = d.cons_gov + d.npish; d.nx = d.exports - d.imports; % check the sum [d.gdp (d.cons + d.invest + d.gov + d.exports - d.imports)] figure plot([d.gdp d.cons d.invest d.gov d.nx]) title('GDP, expenditure approach, mil. CZK') legend('Y','C','I','G','NX') grid %% shares figure plot([d.cons d.invest d.gov d.nx]/d.gdp*100) title('Share to GDP') legend('C/Y','I/Y','G/Y','NX/Y','Location','NorthWest') ylabel('%') grid figure plot([d.exports d.imports]/d.gdp*100) title('Share to GDP') legend('EX/Y','IM/Y') ylabel('%') grid %% diplay to the screen disp('Average share to GDP') disp(' C I G NX') disp(mean([d.cons d.invest d.gov d.nx]/d.gdp*100)) disp(' EX IM ') disp(mean([d.exports d.imports]/d.gdp*100))