load g.03.mat

subplot(2,2,1)

x=[0:N];
y=[2:N+2];

hold off
plot(x,EM_local_min(y),'*-')
hold on
plot(N,EM_local_min(1),'o');
plot(x,EM_equal_ML(y),'x-');
plot(N,EM_equal_ML(1),'o');
xlabel '# init wrong'
ylabel '%'
title '(a) % local min and equal ML'
text(7,EM_local_min(10)+10,'local min');
text(7,EM_equal_ML(10)+10,'equal ML');
axis([0 11 0 100])

subplot(2,2,2)
hold off
plot(x,iter_avg_g(y),'*-');
hold on
plot(N,iter_avg_g(1),'o');
plot(x,iter_max_g(y),'x-');
plot(N,iter_max_g(1),'o');
plot(x,b_equal_ML(y),'+-');
plot(N,b_equal_ML(1),'s');
xlabel '# init wrong'
ylabel '  iter                  avg bits'
title '(b) iter and avg bits equal ML'
text(5,iter_avg_g(8)+.7,'avg');
text(5,iter_max_g(8)+.7,'max');
text(5,b_equal_ML(8)+1,'bits');
axis([0 11 1 10])

hold off
