clear all close all set(0,'defaultlinelinewidth',1.5); x = load('slozky_hdp_cz_2014q2.txt'); t = x(:,1); y = x(:,2); c = x(:,3); g = x(:,4); i = x(:,5); ex = x(:,6); im = x(:,7); nx = ex - im; cy_ratio = c./y; iy_ratio = i./y; gy_ratio = g./y; exy_ratio = ex./y; imy_ratio = im./y; nxy_ratio = nx./y; cy_avg = mean(cy_ratio); iy_avg = mean(iy_ratio); gy_avg = mean(gy_ratio); imy_avg = mean(imy_ratio); exy_avg = mean(exy_ratio); nxy_avg = mean(nxy_ratio); figure plot(t,cy_ratio,t,iy_ratio,t,gy_ratio,t,nxy_ratio) legend('c/y','i/y','g/y','nx/y') title('slozky hdp') grid figure plot(t,imy_ratio,t,exy_ratio) legend('im/y','ex/y') title('import, export') grid disp(' c/y i/y g/y nx/y') disp([cy_avg iy_avg gy_avg nxy_avg]) disp(' ex/y im/y') disp([exy_avg imy_avg])