%plotting the utility functions close all, clear all t = 1:0.001:2; u1 = exp(0.5)*((1-exp(-0.5*t))/(1-exp(-0.5)) - 1); u2 = log(t)/log(2); u3 = (sqrt(t)-1)/(sqrt(2)-1); plot(t,u1,t,u2,t,u3,'LineWidth',2) legend('exp', 'log', 'iso-e', 'location','northwest') xlabel('$t$','interpreter','latex') ylabel('$\tilde{u}(t)$','interpreter','latex') %% %drawing the CDFs A1=[0 1 1.5 2 2.5 4 6 7 7.5]; A2=[0 1.5 3 4 4.5 6 9 9.5 10]; A3=[0 5 5.5 6 6.5 7 8 9 10]; CDF=[0 0.05 0.1 0.2 0.4 0.7 0.85 0.95 1]; stairs(A1,CDF, 'linewidth', 2) hold on stairs(A2,CDF, 'linewidth', 2) stairs(A3,CDF, 'linewidth', 2) legend('CDF-A1','CDF-A2','CDF-A3', 'location','northwest')