% Percentage of airtime as a function of data rate
% Author: Michel Barbeau
% Version: January 4, 2015
%%%% Percentage of each annulus relative to total area
% radii
R=[191   135   107    76    48    30    27    24];
% data rates
D=[15 30   45    60    90    120    135    150];
% Percentage of area of each annulus relative to total area
P=zeros(1,length(R));
for i=1:1:length(R)-1
    P(i)=(power(R(i),2)-power(R(i+1),2)) / power(R(1),2);
end
P(length(R))= power(R(length(R)),2) / power(R(1),2);
% Bit length as a function of data rate
T=1./D;
% total bandwdith (one bit per station)
TOT=sum(P.*T);
% Relative airtime
A=(P.*T)./ TOT;
bar(A.*100);
xlabel('Data rate (in Mbps)');
ylabel('% of total airtime');