Tính lựa chọn cấp bảo vệ dùng phần mềm Matlab

Phần mềm MATLAB được chứa trong đĩa CD hay bao gồm nhiều đĩa 1,4 MB: đĩa hệ thống và các đĩa chứa các hộp thoại công cụ. Do đó để cài đặt MATLAB, cần một

máy tính với các yêu cầu sau :

? Máy tính IBM, Compaq hay hệ thống máy tính tương thích 100 % với một CPU

Intel 386, 486, hay CPU hiệu Pentium.

? Một đĩa cứng với ít nhất 30 MB còn trống.

? Bộ nhớ trong phải tối thiểu là 8 MB.

? Một màn hình màu.

? Phần mềm Microsoft Window 3.X trở lên.

? Hệ điều hành MS-DOS version 3.1 hoặc mới hơn.

? Một mouse sử dụng được trong Window.

pdf26 trang | Chuyên mục: MATLAB | Chia sẻ: dkS00TYs | Lượt xem: 1686 | Lượt tải: 1download
Tóm tắt nội dung Tính lựa chọn cấp bảo vệ dùng phần mềm Matlab, để xem tài liệu hoàn chỉnh bạn click vào nút "TẢI VỀ" ở trên
off',... 
 'string','0',... 
 'Tag','EditText2'); 
h1_TC = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[0.501960784313725 
0.501960784313725 0.501960784313725], ... 
 'FontName','Vni-times', ... 
 'FontSize',11, ... 
 'ForegroundColor',[0 1 0], ... 
ĐỒ ÁN TỐT NGHIỆP 
TRANG 65
 'ListboxTop',0, ... 
 'Position',[21 202.5 112.5 16.5], ... 
 'String','Chọn các thông số C', ... 
 'Style','text', ... 
 'visible','off',... 
 'Tag','StaticText8'); 
h1_Frame3 = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[0.501960784313725 
0.501960784313725 0.250980392156863], ... 
 'ListboxTop',0, ... 
 'Position',[8.25 110.25 138.75 90.75], ... 
 'Style','frame', ... 
 'visible','off',... 
 'Tag','Frame3'); 
h1_TC1 = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[0.501960784313725 
0.501960784313725 0.250980392156863], ... 
 'FontName','Vni-times', ... 
 'FontSize',10, ... 
 'ForegroundColor',[1 0 0], ... 
 'ListboxTop',0, ... 
 'Position',[10.5 183.75 60.75 13.5], ... 
 'String','Chọn C1', ... 
 'Style','text', ... 
 'visible','off',... 
 'Tag','StaticText9'); 
h1_TC2 = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[0.501960784313725 
0.501960784313725 0.250980392156863], ... 
 'FontName','Vni-times', ... 
 'FontSize',10, ... 
 'ForegroundColor',[1 0 0], ... 
ĐỒ ÁN TỐT NGHIỆP 
TRANG 66
 'ListboxTop',0, ... 
 'Position',[11.25 165.75 60.75 14.25], ... 
 'String','Chọn C2', ... 
 'visible','off',... 
 'Style','text', ... 
 'Tag','StaticText9'); 
h1_TC3 = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[0.501960784313725 
0.501960784313725 0.250980392156863], ... 
 'FontName','Vni-times', ... 
 'FontSize',10, ... 
 'ForegroundColor',[1 0 0], ... 
 'ListboxTop',0, ... 
 'Position',[11.25 149.25 60.75 12.75], ... 
 'String','Chọn C3', ... 
 'Style','text', ... 
 'visible','off',... 
 'Tag','StaticText9'); 
h1_TC4 = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[0.501960784313725 
0.501960784313725 0.250980392156863], ... 
 'FontName','Vni-times', ... 
 'FontSize',10, ... 
 'ForegroundColor',[1 0 0], ... 
 'ListboxTop',0, ... 
 'Position',[10.5 132 60.75 13.5], ... 
 'String','Chọn C4', ... 
 'Style','text', ... 
 'visible','off',... 
 'Tag','StaticText9'); 
h1_TC5 = uicontrol('Parent',h0, ... 
 'Units','points', ... 
ĐỒ ÁN TỐT NGHIỆP 
TRANG 67
 'BackgroundColor',[0.501960784313725 
0.501960784313725 0.250980392156863], ... 
 'FontName','Vni-times', ... 
 'FontSize',10, ... 
 'ForegroundColor',[1 0 0], ... 
 'ListboxTop',0, ... 
 'Position',[10.5 114.75 60.75 14.25], ... 
 'String','Chọn C5', ... 
 'Style','text', ... 
 'visible','off',... 
 'Tag','StaticText9'); 
h1_PC1 = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'ListboxTop',0, ... 
 'Position',[81 184.5 63.75 15.75], ... 
 'String','0.25|0.5|1.0|1.0', ... 
 'Style','popupmenu', ... 
 'Tag','PopupMenu1', ... 
 'visible','off',... 
 'Value',1); 
h1_PC2 = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'ListboxTop',0, ... 
 'Position',[81 166.5 63.75 15.75], ... 
 'String','0.5|1.0|2.0', ... 
 'Style','popupmenu', ... 
 'Tag','PopupMenu1', ... 
 'visible','off',... 
 'Value',1); 
h1_PC3 = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'ListboxTop',0, ... 
 'Position',[80.25 148.5 63.75 15.75], ... 
 'String','0.5|1.0|2.0|3.0', ... 
ĐỒ ÁN TỐT NGHIỆP 
TRANG 68
 'Style','popupmenu', ... 
 'Tag','PopupMenu1', ... 
 'visible','off',... 
 'Value',1); 
h1_PC4 = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'ListboxTop',0, ... 
 'Position',[80.25 130.5 63.75 15.75], ... 
 'String','0.5|1.0|3.0', ... 
 'Style','popupmenu', ... 
 'Tag','PopupMenu1', ... 
 'visible','off',... 
 'Value',1); 
h1_PC5 = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'ListboxTop',0, ... 
 'Position',[80.25 112.5 63.75 15.75], ... 
 'String','1.0|5.0|10.0', ... 
 'Style','popupmenu', ... 
 'Tag','PopupMenu1', ... 
 'visible','off',... 
 'Value',1); 
h1_TKQ = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[0.501960784313725 
0.501960784313725 0.501960784313725], ... 
 'FontName','Vni-times', ... 
 'FontSize',11, ... 
 'ForegroundColor',[0 1 0], ... 
 'ListboxTop',0, ... 
 'Position',[37.5 96 73.5 13.5], ... 
 'String','Các kết quả', ... 
 'visible','off',... 
 'Style','text', ... 
ĐỒ ÁN TỐT NGHIỆP 
TRANG 69
 'Tag','StaticText10'); 
h1_Frame4 = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[1 1 0], ... 
 'ListboxTop',0, ... 
 'Position',[8.25 11.25 138.75 81.75], ... 
 'Style','frame', ... 
 'visible','off',... 
 'Tag','Frame4'); 
h1_TNd = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[1 1 0], ... 
 'ForegroundColor',[1 0 0.501960784313725], ... 
 'ListboxTop',0, ... 
 'Position',[14.25 75 53.25 12.75], ... 
 'String','Nd :', ... 
 'visible','off',... 
 'Style','text', ... 
 'Tag','StaticText11'); 
h1_TNc = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[1 1 0], ... 
 'ForegroundColor',[1 0 0.501960784313725], ... 
 'ListboxTop',0, ... 
 'Position',[13.5 56.25 53.25 12.75], ... 
 'String','Nc :', ... 
 'visible','off',... 
 'Style','text', ... 
 'Tag','StaticText11'); 
h1_ENd = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[1 1 1], ... 
 'ListboxTop',0, ... 
 'Position',[80.25 72.75 64.5 15], ... 
ĐỒ ÁN TỐT NGHIỆP 
TRANG 70
 'Style','edit', ... 
 'visible','off',... 
 'string','0',... 
 'Tag','EditText3'); 
h1_ENc = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[1 1 1], ... 
 'ListboxTop',0, ... 
 'Position',[81 54.75 64.5 15], ... 
 'Style','edit', ... 
 'visible','off',... 
 'string','0',... 
 'Tag','EditText3'); 
h1_TE = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[1 1 0], ... 
 'ForegroundColor',[1 0 0.501960784313725], ... 
 'ListboxTop',0, ... 
 'Position',[13.5 36 53.25 12.75], ... 
 'String','E :', ... 
 'visible','off',... 
 'Style','text', ... 
 'Tag','StaticText11'); 
h1_EE = uicontrol('Parent',h0, ... 
 'Units','points', ... 
 'BackgroundColor',[1 1 1], ... 
 'ListboxTop',0, ... 
 'Position',[80.25 36.75 64.5 15], ... 
 'Style','edit', ... 
 'visible','off',... 
 'string','0',... 
 'Tag','EditText3'); 
h1_BAction = uicontrol('Parent',h0, ... 
 'Units','points', ... 
ĐỒ ÁN TỐT NGHIỆP 
TRANG 71
 'BackgroundColor',[0.752941176470588 
0.752941176470588 0.752941176470588], ... 
 'FontName','Vni-times', ... 
 'FontSize',15, ... 
 'ForegroundColor',[1 0 0], ... 
 'ListboxTop',0, ... 
 'Position',[9 13.5 137.25 21], ... 
 'String','Tính toán', ... 
'callback','TinhToan,set(h1_axes,''visible'',''on'')
',... 
 'visible','off',... 
 'Tag','Pushbutton1'); 
d) tính toan 
 %Nhap cac thong so tinh toan 
%Tinh Nd 
L=get(h1_EL,'string'); 
L=str2num(L); 
W=get(h1_EW,'string'); 
W=str2num(W); 
H=get(h1_EH,'string'); 
H=str2num(H); 
Ngmax=get(h1_ENgmax,'string'); 
Ngmax=str2num(Ngmax); 
Ac=L*W+6*H*(L+W)+9*pi*H^2; 
%Chãn C1 
choiceC1=get(h1_PC1,'value'); 
if choiceC1==1,C1=0.25 ; 
elseif choiceC1==2,C1=0.5 ; 
elseif choiceC1==3,C1=1.0; 
elseif choiceC1==4,C1=3.0 ; 
end 
Nd=Ngmax*Ac*C1*10^(-6); 
set(h1_ENd,'string',Nd); 
ĐỒ ÁN TỐT NGHIỆP 
TRANG 72
%TÛnh Nc 
%Chãn C2 
choiceC2=get(h1_PC2,'value'); 
if choiceC2==1,C2=0.5 ; 
elseif choiceC2==2,C2=1.0; 
elseif choiceC2==3,C2=2.0 ; 
end 
%Chãn C3 
choiceC3=get(h1_PC3,'value'); 
if choiceC3==1,C3=0.5 ; 
elseif choiceC3==2,C3=1.0; 
elseif choiceC3==3,C3=2.0 ; 
elseif choiceC3==4,C3=3.0 ; 
end 
%Chãn C4 
choiceC4=get(h1_PC4,'value'); 
if choiceC4==1,C4=0.5 ; 
elseif choiceC4==2,C4=1.0; 
elseif choiceC4==3,C4=3.0 ; 
end 
%Chãn C5 
choiceC5=get(h1_PC5,'value'); 
if choiceC5==1,C5=1.0 ; 
elseif choiceC5==2,C5=5.0; 
elseif choiceC5==3,C5=10.0 ; 
end 
C=C2*C3*C4*C5; 
Nc=5.5/C; 
set(h1_ENc,'string',Nc); 
if Nd<=Nc,set(h1_THE,'FontName','Vni-times', ... 
 'FontSize',15,'string','KHÔNG CẦN BẢO VỆ'); 
else 
 E=1-Nc/Nd; 
 set(h1_EE,'string',E); 
ĐỒ ÁN TỐT NGHIỆP 
TRANG 73
 if (E>0.98),set(h1_THE,'FontName','Vni-times', 
... 
 'FontSize',15,'string','BẢO VỆ CẤP 1 + BỔ 
SUNG'); 
 elseif 
(E>=0.95)&(E<=0.98),set(h1_THE,'FontName','Vni-
times', ... 
 'FontSize',15,'string','BẢO VỆ CẤP 1'); 
 elseif 
(E>=0.8)&(E<0.95),set(h1_THE,'FontName','Vni-times', 
... 
 'FontSize',15,'string','BẢO VỆ CẤP 2'); 
 elseif (E>0)&(E<0.8),set(h1_THE,'FontName','Vni-
times', ... 
 'FontSize',15,'string','BẢO VỆ CẤP 3'); 
 end 
end 
 ve(L,W,H); 
e) ve 
function ve(L,W,H) 
hh=H-2; 
%ChiỊu cao H 
subplot(6,1.52,3.1); 
xo=[0 0];yo=[H+2 2*H+2];plot(xo,yo,'--'); 
text(0,2*H,' 
\leftarrowH','fontsize',8,'color','r'); 
hold on 
%ChiỊu dªi L 
x1=[0 L];y1=[2*H+2 2*H+2];plot(x1,y1,'--'); 
text(L/2,2*H-1,' \downarrow 
L','fontsize',8,'color','r'); 
x2=[L L];y2=[2*H+2 H+2];plot(x2,y2,'--'); 
x3=[L 0];y3=[H+2 H+2];plot(x3,y3,'--'); 
%w Lª chiỊu rèng 
x4=[0 W];y4=[2*H+2 2.25*H+2];plot(x4,y4,'--'); 
x5=[W L+W];y5=[2.25*H+2 2.25*H+2];plot(x5,y5,'--'); 
ĐỒ ÁN TỐT NGHIỆP 
TRANG 74
x6=[L+W L];y6=[2.25*H+2 2*H+2];plot(x6,y6,'--'); 
text(L+1,2*H+1,'\uparrow 
W','fontsize',8,'color','r'); 
x7=[L+W L+W];y7=[2.25*H+2 1.25*H+2];plot(x7,y7,'--
'); 
x8=[L+W L];y8=[1.25*H+2 H+2];plot(x8,y8,'--'); 
title('Kích thước toà nhà','Fontname','Vni-
times',... 
 'fontsize',15,'color','y'); 
%axis off 
hold off 
global h 
subplot(2,1.65,3.3); 
h=rectangle('Position',[0,0,(6*H)+W,(6*H)+L],... 
 'Curvature',[0.8,0.4],... 
 'LineWidth',2,'FaceColor','r','EdgeColor','r'); 
title('Diện tích tương đương AC','Fontname','Vni-
times',... 
 'fontsize',15,'color','y'); 

File đính kèm:

  • pdfTính lựa chọn cấp bảo vệ dùng phần mềm Matlab.pdf
Tài liệu liên quan