%% Generate FTP Application Traffic Pattern to Visualize Packet Sizes and Intervals
% Create a default FTP application traffic pattern object.

cfgFTP = networkTrafficFTP;

% Generate an FTP application traffic pattern with 20,000 FTP packets.

for packetCount = 1:20000
    [dt(packetCount),packetSize(packetCount)] = generate(cfgFTP);
end

% Visualize the FTP packet sizes.

stem(packetSize); 
title('Packet Size Versus Packet Number');
xlabel('Packet Number');
ylabel('Packet Size in Bytes');

% Visualize the FTP packet intervals.

figure;
stem(dt); 
title('dt Versus Packet Number');
xlabel('Packet Number');
ylabel('dt in Milliseconds');

% Copyright 2020 The MathWorks, Inc.