⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 erlangc.m

📁 Matlab实现:erlang 公式
💻 M
字号:
%% p=erlangc(n,rho)%% This function computes the Erlang C probability that a system with n% servers, infinite waiting line, Poisson arrival rate lambda, service rate % (per server) mu, and intensity rho=lambda/mu will have all servers busy.  %% It uses the formula %%  C(n,rho)=n*B(n,rho)/(n-rho*(1-B(n,rho)))%% See Cooper, Introduction to Queueing Theory, 2nd Ed.%function C=erlangc(n,rho)%% Sanity check- make sure that n is a positive integer.%  if ((floor(n) ~= n) || (n < 1))    warning('n is not a positive integer');    C=NaN;    return;  end;%% Sanity check- make sure that rho >= 0.0.%  if (rho < 0.0)    warning('rho is negative!');    C=NaN;    return;  end;%% Calculate the Erlang B probability and then convert to Erlang C.%B=erlangb(n,rho);C=n*B/(n-rho*(1-B));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -