?? sysiden.m
字號:
%系統(tǒng)辨識
%delete(f_1);
set(gcf,'DefaultTextFontSize',12)
set(f_1,'visible','off');
%set(m_1ctrlt,'visible','off');
set(gcf,'defaultuicontrolunits','normalized');
H=axes('unit','normalized','position',[0,0,1,1],'visible','off');
%全局設置
top=0.98;
bottom=0.1;
left=0.01;
right=0.95;
textHeight = 0.03;
textWidth = 0.12;
labelWidth= 0.13;
radioWidth=0.25;
spacing=0.02;
%ga 參數(shù)
labelBottom=top-textHeight-spacing;
labelLeft = left+0.05;
frmPos=[left+0.03 labelBottom-4*textHeight-5*spacing 0.29 5*textHeight+6*spacing];
f_2=uicontrol('style','frame','position',frmPos,'background',[0.3 0.3 0.3],'foreground','Yellow');
labelPos = [labelLeft labelBottom labelWidth textHeight];
t_1 = uicontrol( ...
'Style','text', ...
'Units','normalized', ...
'Position',labelPos, ...
'Horiz','left', ...
'String','變異概率', ...
'Interruptible','off', ...
'BackgroundColor',[0.3 0.3 0.3], ...
'ForegroundColor','white',...
'TooltipString','Sampling Frequency');
%text(0.1,0.95,'變異概率:','fontsize',10);
textPos = [labelLeft+labelWidth labelBottom textWidth textHeight];
e_pmutation= uicontrol( ...
'Style','edit', ...
'Units','normalized', ...
'Position',textPos, ...
'Horiz','center', ...
'Background','white', ...
'Foreground','black', ...
'String','0.015','Userdata',0.015);
labelBottom=top-2*textHeight-2*spacing;
labelPos = [labelLeft labelBottom labelWidth textHeight];
t_2 = uicontrol( ...
'Style','text', ...
'Units','normalized', ...
'Position',labelPos, ...
'Horiz','left', ...
'String','交叉概率', ...
'Interruptible','off', ...
'BackgroundColor',[0.3 0.3 0.3], ...
'ForegroundColor','white');
%text(0.1,0.85,'交叉概率:','fontsize',10);
textPos = [labelLeft+labelWidth labelBottom textWidth textHeight];
e_pcross=uicontrol( ...
'Style','edit', ...
'Units','normalized', ...
'Position',textPos, ...
'Horiz','center', ...
'Background','white', ...
'Foreground','black', ...
'String','0.1','Userdata',0.1);
%uicontrol(gcf,'style','edit','background','white',...
% 'position',[0.25,0.825,0.15,0.05],'string','0.1');
labelBottom=top-3*textHeight-3*spacing;
labelPos = [labelLeft labelBottom labelWidth textHeight];
t_3 = uicontrol( ...
'Style','text', ...
'Units','normalized', ...
'Position',labelPos, ...
'Horiz','left', ...
'String','最大世代數(shù)', ...
'Interruptible','off', ...
'BackgroundColor',[0.3 0.3 0.3], ...
'ForegroundColor','white');
%text(0.1,0.75,'最大世代數(shù):','fontsize',10);
textPos = [labelLeft+labelWidth labelBottom textWidth textHeight];
e_maxgen=uicontrol( ...
'Style','edit', ...
'Units','normalized', ...
'Position',textPos, ...
'Horiz','center', ...
'Background','white', ...
'Foreground','black', ...
'String','50','Userdata',50);
%uicontrol(gcf,'style','edit','background','white',...
% 'position',[0.25,0.725,0.15,0.05],'string','50');
labelBottom=top-4*textHeight-4*spacing;
labelPos = [labelLeft labelBottom labelWidth textHeight];
t_4 = uicontrol( ...
'Style','text', ...
'Units','normalized', ...
'Position',labelPos, ...
'Horiz','left', ...
'String','染色體長度', ...
'Interruptible','off', ...
'BackgroundColor',[0.3 0.3 0.3], ...
'ForegroundColor','white');
%text(0.1,0.65,'染色體長度:','fontsize',10);
textPos = [labelLeft+labelWidth labelBottom textWidth textHeight];
e_lchrom=uicontrol( ...
'Style','edit', ...
'Units','normalized', ...
'Position',textPos, ...
'Horiz','center', ...
'Background','white', ...
'Foreground','black', ...
'String','8','Userdata',8);
%uicontrol(gcf,'style','edit','background','white',...
% 'position',[0.25,0.625,0.15,0.05],'string','8');
labelBottom=top-5*textHeight-5*spacing;
labelPos = [labelLeft labelBottom labelWidth textHeight];
t_5 = uicontrol( ...
'Style','text', ...
'Units','normalized', ...
'Position',labelPos, ...
'Horiz','left', ...
'String','種群大小', ...
'Interruptible','off', ...
'BackgroundColor',[0.3 0.3 0.3], ...
'ForegroundColor','white');
%text(0.1,0.55,'種群大小:','fontsize',10);
textPos = [labelLeft+labelWidth labelBottom textWidth textHeight];
e_popsize=uicontrol( ...
'Style','edit', ...
'Units','normalized', ...
'Position',textPos, ...
'Horiz','center', ...
'Background','white', ...
'Foreground','black', ...
'String','20','Userdata',20);
%階次選擇
%text(0.6,0.86,'對象級別:','fontsize',10);
labelBottom=top-6*textHeight-8*spacing;
labelPos = [labelLeft labelBottom radioWidth textHeight];
frmPos=[left+0.03 labelBottom-2*textHeight-3*spacing 0.29 3*textHeight+4*spacing];
f_3=uicontrol('style','frame','position',frmPos,'background',[0.3 0.3 0.3],'foreground','Yellow');
labelPos = [labelLeft labelBottom radioWidth textHeight];
r_order1=uicontrol(gcf,'style','radio','string','非線性系統(tǒng)辨識',...
'position',labelPos);
set(r_order1,'value',get(r_order1,'Max'));
order=1;
isysiden=imread('sysidenann.jpg');
h=axes('position',[0.4 0.12 0.45 0.34]);
im_sysiden=image(isysiden);
set(h,'visible','off');
set(r_order1,'callback',['order=1;',...
'set(r_order1,''value'',get(r_order1,''Max'')),',...
'set(r_order2,''value'',get(r_order2,''Min'')),',...
'set(r_order3,''value'',get(r_order3,''Min'')),',...
'set(e_gsm1,''enable'',''off''),',...
'set(e_gsm2,''enable'',''off''),',...
'set(e_gsm3,''enable'',''off''),',...
'set(e_gsn1,''enable'',''off''),',...
'set(e_gsn2,''enable'',''off''),',...
'set(e_gsn3,''enable'',''off''),',...
'set(e_gszh,''enable'',''off''),',...
' isysiden=imread(''sysidenann.jpg'');',...
' h=axes(''position'',[0.4 0.12 0.45 0.34]);',...
'delete(im_sysiden);',...
'im_sysiden=image(isysiden);',...
'set(h,''visible'',''off'');',...
]);
labelBottom=top-7*textHeight-9*spacing;
labelPos = [labelLeft labelBottom radioWidth textHeight];
r_order2=uicontrol(gcf,'style','radio','string','二階系統(tǒng) ',...
'position',labelPos);
set(r_order2,'callback',[...
'order=2;set(r_order2,''value'',get(r_order2,''Max'')),',...
'set(r_order1,''value'',get(r_order1,''Min'')),',...
'set(r_order3,''value'',get(r_order3,''Min'')),',...
'set(e_gsm1,''enable'',''on''),',...
'set(e_gsm2,''enable'',''on'',''string'',''[1 500]''),',...
'set(e_gsm3,''enable'',''off''),',...
'set(e_gsn1,''enable'',''on'',''string'',''[1 100]''),',...
'set(e_gsn2,''enable'',''on'',''string'',''[1 50]''),',...
'set(e_gsn3,''enable'',''off''),',...
'set(e_gszh,''enable'',''on''),',...
'isysiden=imread(''2.bmp'');',...
'h=axes(''position'',[0.45 0.25 0.3 0.15]);',...
'delete(im_sysiden);',...
'im_sysiden=image(isysiden);',...
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -