% % 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. % %----- clc; lambda_n = 2*[ 3:-1:1 ]; % \lambda_0, \lambda_1, \lambda_2 mu_n = [ 3, 3, 4 ]; % \mu_1, \mu_2, \mu_3 rho_tmp = lambda_n ./ mu_n; rho_n = [ 1, cumprod( rho_tmp ) ]; p_0 = 1/sum( rho_n ); fprintf('the normalization probability is %10.6f\n', p_0 ); p_n = p_0*rho_n; abm = dot( 0:3, p_n ); fprintf('average number of machines that are broken is given by %10.6f\n', abm ); abdr = dot( [lambda_n,0], p_n ); fprintf('average rate at which machines break down is given by %10.6f\n', abdr );