% Erlang B plotting routine % % based on Ted Rappaport's Wireless text ... page 560 (equation A.28) % % by Dr. Thad B. Welch, PE {t.b.welch@ieee.org} % % 6 September 2001 N = 500; % number of points calculated A = logspace(-3,3,N); % x-axis vector (0.001 to 10) C = [1:10 15:5:50 60:10:100]; for index = 1:23 % 10 % number of channels. Each "channel" creates a new curve on the graph denom = zeros(1, N); for n = 0:C(index) denom = denom + (A.^n)/factorial(n); end Pblock = ((A.^C(index))/factorial(C(index)))./denom; if (C(index) == 1) loglog(A,Pblock,'r') hold on elseif (C(index) == 15) loglog(A,Pblock,'r') elseif (C(index) == 60) loglog(A,Pblock,'r') else loglog(A,Pblock,'b') end end grid axis([A(1) A(N) 0.001 1]) title('Plot of the Erlang B Distribution') xlabel('A, traffic intensity in Erlangs') ylabel('P_{block}, probability of blocking') hold off