フィルターのクリア

Capacity of a cell (traffic measurement)

3 ビュー (過去 30 日間)
Theman JIrnadu
Theman JIrnadu 2017 年 10 月 25 日
編集済み: Stephen23 2017 年 10 月 25 日
PART A
if (length(N)~=1) | (fix(N) ~= N) | (N < 0)
error('N must be a scalar positive integer');
end
% TODO: test that elements of A are real and positive here?
esum = zeros(size(A));
for ii=0:N
esum = esum + A .^ ii ./ factorial(ii);
end
B = A .^ N ./ (factorial(N) .* esum);
PART B
% ex1.m example for erlangb function
close all
clear all
lambda=0:0.0001:0.0065; % mean arrival rate (calls per second)
d=200; % mean duration (seconds per call)
a = lambda.*d; % traffic intensity in Erlangs
n = 1;
b = erlangb(n, a); % n channels/servers
ii=find(b<0.1);
plot(a(ii), b(ii), 'b')
hold on
n = 2;
b = erlangb(n, a); % n channels/servers
ii=find(b<0.1);
plot(a(ii), b(ii), 'g')
n = 3;
b = erlangb(n, a); % n channels/servers
plot(a, b, 'r')
n = 4;
b = erlangb(n, a); % n channels/servers
plot(a, b, 'k')
legend('1', '2', '3', '4 channels', 0)
xlabel('Traffic Intensity (Erlangs)');
ylabel('Blocking Probability');
title('Erlang B formula');
plot(a, 0.02, ':k') % 2% line
I inputed the above code into matlab,at first only part B it then shows me "error in erlangb (line 7) b=erlangb (n, a)". And again on adding PART A it pops up "no input argument,requires more input argument to run". please help

回答 (0 件)

カテゴリ

Help Center および File ExchangeString Parsing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by