loadall x=[] for i=1:size(heritage_country,1) loc=find(strcmp(heritage_country(i),fraser_country)); if (~isempty(loc)) if (~isnan(heritage_freedom(i)) & ~isnan(fraser_freedom(loc))) x=[x;x1(i) x2(i) x3(i) x4(i) x5(i) x6(i) x7(i) x8(i) x9(i) x10(i) heritage_freedom(i) -fraser_freedom(loc)]; end end end y=[]; for i=1:size(x,1) if (isempty(find(isnan(x(i,:))))) y=[y; x(i,:)]; end end for i=1:size(y,2) ma=max(y(:,i)); mi=min(y(:,i)); y(:,i)=(y(:,i)-mi)/(ma-mi); end imagesc(corrcoef(y)) colorbar axis off title('Correlations between freedom indices') gg=text(0.25,1,'Trade'); set(gg,'HorizontalAlignment','right'); gg=text(0.25,2,'Fiscal burden'); set(gg,'HorizontalAlignment','right'); gg=text(0.25,3,'Gov. interven.'); set(gg,'HorizontalAlignment','right'); gg=text(0.25,4,'Monetary policy'); set(gg,'HorizontalAlignment','right'); gg=text(0.25,5,'Foreign inv.'); set(gg,'HorizontalAlignment','right'); gg=text(0.25,6,'Banking/finance'); set(gg,'HorizontalAlignment','right'); gg=text(0.25,7,'Wages/prices'); set(gg,'HorizontalAlignment','right'); gg=text(0.25,8,'Property rights'); set(gg,'HorizontalAlignment','right'); gg=text(0.25,9,'Regulation'); set(gg,'HorizontalAlignment','right'); gg=text(0.25,10.25,'Black market'); set(gg,'HorizontalAlignment','right'); gg=text(0.25,11,'Heritage freedom'); set(gg,'HorizontalAlignment','right'); gg=text(0.25,12,'Fraser freedom'); set(gg,'HorizontalAlignment','right'); gg=text(1,12.6,'Trade'); set(gg,'Rotation',[90]); set(gg,'HorizontalAlignment','right'); set(gg,'FontSize',[8]); gg=text(2,12.6,'Fiscal burden'); set(gg,'HorizontalAlignment','right'); set(gg,'Rotation',[90]); set(gg,'FontSize',[8]); gg=text(3,12.6,'Gov. interven.'); set(gg,'HorizontalAlignment','right'); set(gg,'Rotation',[90]); set(gg,'FontSize',[8]); gg=text(4,12.6,'Monetary policy'); set(gg,'HorizontalAlignment','right'); set(gg,'Rotation',[90]); set(gg,'FontSize',[8]); gg=text(5,12.6,'Foreign inv.'); set(gg,'HorizontalAlignment','right'); set(gg,'Rotation',[90]); set(gg,'FontSize',[8]); gg=text(6,12.6,'Banking/finance'); set(gg,'HorizontalAlignment','right'); set(gg,'Rotation',[90]); set(gg,'FontSize',[8]); gg=text(7,12.6,'Wages/prices'); set(gg,'HorizontalAlignment','right'); set(gg,'Rotation',[90]); set(gg,'FontSize',[8]); gg=text(8,12.6,'Property rights'); set(gg,'HorizontalAlignment','right'); set(gg,'Rotation',[90]); set(gg,'FontSize',[8]); gg=text(9,12.6,'Regulation'); set(gg,'HorizontalAlignment','right'); set(gg,'Rotation',[90]); set(gg,'FontSize',[8]); gg=text(10,12.6,'Black market'); set(gg,'HorizontalAlignment','right'); set(gg,'Rotation',[90]); set(gg,'FontSize',[8]); gg=text(11,12.6,'Heritage freedom'); set(gg,'HorizontalAlignment','right'); set(gg,'Rotation',[90]); set(gg,'FontSize',[8]); gg=text(12,12.6,'Fraser freedom'); set(gg,'HorizontalAlignment','right'); set(gg,'Rotation',[90]); set(gg,'FontSize',[8]);