clear all
R=[];
N=10;
figure(101);
hold off
for n=2:2:N
    HO=ceil((1:n)/2); % H-O bond strength with H-O = 1 normalized
    E=2+HO; % hydrogen bond strength including H-N bond with 2 = H-N bond strength. 
    P=E/sum(E); % base distribtuion
    tau=HO; % base pairing times depending on H-O strength with tau_1=1
    P=E/sum(E); % base distribtuion
    H=-P*(log2(P))'; % entropy
    T=tau*P'; % average base pairing time
    R=[R;H/T]; % information rate
end
plot(2:2:N,R,'r.','markersize',20)
xlabel('Base Number \it n')
ylabel('Normalized Rate \it\tau_{1,2} R')
