set(handles.NUT3,'Value',1); set(handles.NUT4,'Value',0); set(handles.NUT5,'Value',0); set(handles.NUT6,'Value',0); set(handles.NUT7,'Value',0); set(handles.NUT8,'Value',0); set(handles.NUT9,'Value',0); set(handles.NUT10,'Value',0); set(handles.NUT11,'Value',0); set(handles.NUT12,'Value',0);
%THONG SO C = 6;
L = 1;
lamda = 1000;
%KHI SU DUNG FDL = 50 ms B2=50;
n0 = 10^3.*C./(lamda.*L);
%CHON i THOA DIEU KIEN i>n0+1 i=7:12;
Ti2=B2.*C./(lamda.*L.*(i-n0).*(i-n0+1)); a=3.333;
b=1.4286;
%CHON n THOA DIEU KIEN n>i n=25;
Có thể bạn quan tâm!
- A) Trường Ưu Tiên Trong Gói Điều Khiển
- N0 1 Thì Tốc Độ Mà Chùm Lấp Đầy Hàng Đợi Là
- Giải pháp điều khiển nghẽn trong mạng OBS bằng phương pháp làm lệch hướng đi - 8
- Giải pháp điều khiển nghẽn trong mạng OBS bằng phương pháp làm lệch hướng đi - 10
Xem toàn bộ 88 trang tài liệu này.
p=factorial(n)./(factorial(i).*factorial(n-i)).*((b./(a+b)).^i).*((b./(a+b)).^(n-i)); Pl2=p.*exp(-i.*a.*Ti2);
%VE HAM Pl2 THEO i
m=plot(i,Pl2,'r+:');
title('ket qua khi FDL=50ms'); xlabel('luu luong tai'); ylabel('xac suat chum suy hao');
%HIEN THI TREN HE TOA DO
axes(m,'square')
% --- Executes on button press in NUT4.
function NUT4_Callback(hObject, eventdata, handles) set(handles.NUT1,'Value',0); set(handles.NUT2,'Value',0); set(handles.NUT3,'Value',0); set(handles.NUT4,'Value',1); set(handles.NUT5,'Value',0); set(handles.NUT6,'Value',0); set(handles.NUT7,'Value',0); set(handles.NUT8,'Value',0); set(handles.NUT9,'Value',0); set(handles.NUT10,'Value',0); set(handles.NUT11,'Value',0); set(handles.NUT12,'Value',0);
%THONG SO C = 6;
L = 1;
lamda = 1000;
%KET HOP KHONG SU DUNG FDL, KHI FDL=10ms VA FDL=50ms B = 0;
B1=10;
B2=50;
n0 = 10^3.*C./(lamda.*L); i=7:12;
Ti=B.*C./(lamda.*L.*(i-n0).*(i-n0+1));
Ti1=B1.*C./(lamda.*L.*(i-n0).*(i-n0+1));
Ti2=B2.*C./(lamda.*L.*(i-n0).*(i-n0+1)); a=3.333;
b=1.4268; n=25;
p=factorial(n)./(factorial(i).*factorial(n-i)).*((b./(a+b)).^i).*((b./(a+b)).^(n-i));
Pl=p.*exp(-i.*a.*Ti);
Pl1=p.*exp(-i.*a.*Ti1);
Pl2=p.*exp(-i.*a.*Ti2);
%VE TONG HOP 3 DO THI
w=plot(i,Pl,'b*-',i,Pl1,'ko--',i,Pl2,'r+:'); title('so sanh ket qua');
xlabel('luu luong tai'); ylabel('xac suat chum suy hao');
%HIEN THI DO THI TONG HOP TREN HE TOA DO
axes(w);
function NUT5_Callback(hObject, eventdata, handles) set(handles.NUT1,'Value',0); set(handles.NUT2,'Value',0); set(handles.NUT3,'Value',0); set(handles.NUT4,'Value',0); set(handles.NUT5,'Value',1); set(handles.NUT6,'Value',0); set(handles.NUT7,'Value',0); set(handles.NUT8,'Value',0); set(handles.NUT9,'Value',0); set(handles.NUT10,'Value',0); set(handles.NUT11,'Value',0); set(handles.NUT12,'Value',0);
%THONG SO C = 6;
L = 1;
lamda = 1000;
%KHI SU DUNG FDL = 50 ms B5=0;
n0 = 10^3.*C./(lamda.*L);
%CHON i THOA DIEU KIEN i>n0+1 i=7:12;
Ti5=B5.*C./(lamda.*L.*(i-n0).*(i-n0+1));
a5=3.1250; b5=1.4706;
%CHON n THOA DIEU KIEN n>i n=25;
p=factorial(n)./(factorial(i).*factorial(n-i)).*((b5./(a5+b5)).^i).*((b5./(a5+b5)).^(n-i)); Pl5=p.*exp(-i.*a5.*Ti5);
%VE HAM Pl2 THEO i
l=plot(i,Pl5,'k*:');
title('khong FDL voi 1/a=320 va 1/b=680'); xlabel('luu luong tai');
ylabel('xac suat chum suy hao');
%HIEN THI TREN HE TOA DO
axes(l,'square')
function NUT6_Callback(hObject, eventdata, handles) set(handles.NUT1,'Value',0); set(handles.NUT2,'Value',0); set(handles.NUT3,'Value',0); set(handles.NUT4,'Value',0); set(handles.NUT5,'Value',0); set(handles.NUT6,'Value',1); set(handles.NUT7,'Value',0); set(handles.NUT8,'Value',0); set(handles.NUT9,'Value',0); set(handles.NUT10,'Value',0); set(handles.NUT11,'Value',0); set(handles.NUT12,'Value',0);
%THONG SO C = 6;
L = 1;
lamda = 1000;
%KHI SU DUNG FDL = 50 ms B6=0;
n0 = 10^3.*C./(lamda.*L);
%CHON i THOA DIEU KIEN i>n0+1 i=7:12;
Ti6=B6.*C./(lamda.*L.*(i-n0).*(i-n0+1)); a=3.333;
b=1.4268;
%CHON n THOA DIEU KIEN n>i n=25;
p=factorial(n)./(factorial(i).*factorial(n-i)).*((b./(a+b)).^i).*((b./(a+b)).^(n-i)); Pl6=p.*exp(-i.*a.*Ti6);
%VE HAM Pl2 THEO i
q=plot(i,Pl6,'r+:');
title('khong FDL voi 1/a=300 va 1/b=700'); xlabel('luu luong tai');
ylabel('xac suat chum suy hao');
%HIEN THI TREN HE TOA DO
axes(q,'square')
function NUT7_Callback(hObject, eventdata, handles) set(handles.NUT1,'Value',0); set(handles.NUT2,'Value',0); set(handles.NUT3,'Value',0); set(handles.NUT4,'Value',0); set(handles.NUT5,'Value',0); set(handles.NUT6,'Value',0); set(handles.NUT7,'Value',1); set(handles.NUT8,'Value',0); set(handles.NUT9,'Value',0); set(handles.NUT10,'Value',0); set(handles.NUT11,'Value',0); set(handles.NUT12,'Value',0);
%THONG SO C = 6;
L = 1;
lamda = 1000;
%KHI SU DUNG FDL = 50 ms B7=0;
n0 = 10^3.*C./(lamda.*L);
%CHON i THOA DIEU KIEN i>n0+1 i=7:12;
Ti7=B7.*C./(lamda.*L.*(i-n0).*(i-n0+1)); a7=3.5714;
b7=1.3889;
%CHON n THOA DIEU KIEN n>i n=25;
p=factorial(n)./(factorial(i).*factorial(n-i)).*((b7./(a7+b7)).^i).*((b7./(a7+b7)).^(n-i)); Pl7=p.*exp(-i.*a7.*Ti7);
%VE HAM Pl2 THEO i
x=plot(i,Pl7,'bo:');
title('khong FDL voi 1/a=280 va 1/b=720'); xlabel('luu luong tai');
ylabel('xac suat chum suy hao');
%HIEN THI TREN HE TOA DO
axes(x,'square')
function NUT8_Callback(hObject, eventdata, handles) set(handles.NUT1,'Value',0); set(handles.NUT2,'Value',0); set(handles.NUT3,'Value',0); set(handles.NUT4,'Value',0); set(handles.NUT5,'Value',0); set(handles.NUT6,'Value',0); set(handles.NUT7,'Value',0); set(handles.NUT8,'Value',1);
set(handles.NUT9,'Value',0); set(handles.NUT10,'Value',0); set(handles.NUT11,'Value',0); set(handles.NUT12,'Value',0);
%THONG SO C = 6;
L = 1;
lamda = 1000;
%KHI SU DUNG FDL = 50 ms B5=50;
n0 = 10^3.*C./(lamda.*L);
%CHON i THOA DIEU KIEN i>n0+1 i=7:12;
Ti5=B5.*C./(lamda.*L.*(i-n0).*(i-n0+1)); a5=3.1250;
b5=1.4706;
%CHON n THOA DIEU KIEN n>i n=25;
p=factorial(n)./(factorial(i).*factorial(n-i)).*((b5./(a5+b5)).^i).*((b5./(a5+b5)).^(n-i)); Pl5=p.*exp(-i.*a5.*Ti5);
%VE HAM Pl2 THEO i
l=plot(i,Pl5,'k*:');
title('khong FDL voi 1/a=320 va 1/b=680'); xlabel('luu luong tai');
ylabel('xac suat chum suy hao');
%HIEN THI TREN HE TOA DO
axes(l,'square')
function NUT9_Callback(hObject, eventdata, handles) set(handles.NUT1,'Value',0); set(handles.NUT2,'Value',0); set(handles.NUT3,'Value',0); set(handles.NUT4,'Value',0);
set(handles.NUT5,'Value',0); set(handles.NUT6,'Value',0); set(handles.NUT7,'Value',0); set(handles.NUT8,'Value',0); set(handles.NUT9,'Value',1); set(handles.NUT10,'Value',0); set(handles.NUT11,'Value',0); set(handles.NUT12,'Value',0);
%THONG SO C = 6;
L = 1;
lamda = 1000;
%KHI SU DUNG FDL = 50 ms B6=50;
n0 = 10^3.*C./(lamda.*L);
%CHON i THOA DIEU KIEN i>n0+1 i=7:12;
Ti6=B6.*C./(lamda.*L.*(i-n0).*(i-n0+1)); a=3.333;
b=1.4268;
%CHON n THOA DIEU KIEN n>i n=25;
p=factorial(n)./(factorial(i).*factorial(n-i)).*((b./(a+b)).^i).*((b./(a+b)).^(n-i)); Pl6=p.*exp(-i.*a.*Ti6);
%VE HAM Pl2 THEO i
q=plot(i,Pl6,'r+:');
title('khong FDL voi 1/a=300 va 1/b=700'); xlabel('luu luong tai');
ylabel('xac suat chum suy hao');
%HIEN THI TREN HE TOA DO
axes(q,'square')
function NUT10_Callback(hObject, eventdata, handles)