Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use MATLAB to generate histograms that shows the percentage of packet trains that are of a certain length. Inputs to your program: A packet train

Use MATLAB to generate histograms that shows the percentage of packet trains that are of a certain length.

Inputs to your program:

A "packet train" of length i is a sequence of i consecutive packets (with no gaps or idle slots in between).

In a given time slot the probability that a station has a single packet to transmit is p. The probability of no packet in a slot (idle slot) is 1-p. One packet fills one time slot. In your program you will need to use a random number generator function to simulate the probability that a slot has a packet or not.

For each of three values of p you will plot a histogram showing the percentage of packet trains of lenth i. The horizontal axis of the histograms will be the packet train length (i=1,2,3...) and the vertical axis will be the percentage of a specific packet train length occurring out of the total number of trains for a specific value of p.

You will generate histograms for p = 0.25, p = 0.5 and p = 0.75. Also consider the number of time slots to be 100,000. Increase the number of slots if any curve(s) is too bumpy. Record the percentage of each packet train length for the above three packet transmission probabilities. The percentage of a specific packet train of length i is one hundred times the number of times that packet trains of length i occurs divided by the total number of packet trains of all lengths found in your simulation (for each specific value of p).

Output of your program:

Make a histogram showing the relationship of the packet train length and the percentage of that specific packet train length of the total number of trains. Your graph should be such that packet train length is on the X-axis and the Percentageis on the Y-axis. Axes should be labeled along with value of p for each curve/graph.

Add a quick flowchart (6 boxes) to better explain code as well.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linear Algebra with Applications

Authors: Steven J. Leon

7th edition

131857851, 978-0131857858

More Books

Students also viewed these Mechanical Engineering questions

Question

identify how the Patients Bill of Rights protects patients

Answered: 1 week ago