M/M/1 Simulation with Matlab

A simple simulation of M/M/1 queue with Matlab. The distribution of the number of “packets” in the system is computed and compared with the theoretical result. delta=0.1; % simulation step in sec lambda=0.1; % arrival rate in packets per second mu=0.2; % departure rate in packets per second rho=lambda/mu; M=50*3600/delta; % number of simulation step…