function L = L_MM1_queue(lambda,mu,N) % L_MM1_QUEUE - The average number of customers in steady-state in a M/M/1 queue with capacity N % % Written by: % -- % John L. Weatherwax 2007-09-10 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- rho = lambda/mu; L = (rho/(1-rho))*( N*rho^(N+1) - (N+1)*rho^N + 1 )/( 1 - rho^(N+1) );