Matlab plot title centered

It should be

varname=char('Interest Rate (r)','Investment (i)','Tobin''Q (pk)',...
'Capital (k)','Inflation (\pi)','Wage (w)','Consumption (c)',...
'Output (y)','Labour (l)','Capital Utilisation (mpk)',...
'Premium (pm)','Real cost of Credit (rk)',...
'Networth (n)','M0','M2','Unemployment (u)');


for i=1:15
subplot(4,4,i)
plot(randn(10,1),'r--','LineWidth',1.5)
axis tight;
set(gca,'FontSize',12, 'FontName','Times') 
ax = gca;
ax.YAxis.Exponent=0; 
title(deblank(varname(i,:)));
end
1 Like