Demo entry 6762920

hw5_7g

   

Submitted by anonymous on Oct 17, 2018 at 20:59
Language: Matlab. Code size: 339 Bytes.

clear; close all;
J=16;
p=1/J;
N=10^5;
lambda=0.9*p*(1-p)^(J-1);
x = aloha_simulation(J,p,lambda,N);

figure;
stairs(1:1000,x(1:4,1:1000)','LineWidth',2);
title('Evolution of queues 1..4 over the first 1000 time slots');
xlabel('time');
ylabel('packets in queues 1..4');grid on;
legend('queue 1','queue 2','queue 3','queue 4');

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).