📄 dualteq.m
字号:
'Horiz','right', ... 'Background','white', ... 'Foreground','black', ... 'String',str,'Userdata',mat, ... 'callback',callbackStr); % FFT Size label btnNumber=3; yPos=menutop-(btnNumber-1)*(btnHt+spacing); top = yPos - btnHt - spacing; labelWidth = frmWidth-textWidth-.01; labelBottom=top-textHeight; labelLeft = left; labelPos = [labelLeft labelBottom labelWidth textHeight]; h = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',labelPos, ... 'Horiz','left', ... 'String','FFT Size (N)', ... 'Interruptible','off', ... 'BackgroundColor',[0.5 0.5 0.5], ... 'ForegroundColor','white'); % set FFT size textPos = [labelLeft+labelWidth-.015 labelBottom textWidth+.025 textHeight]; callbackStr = 'dualteq(''setN'')'; str = sprintf('512'); mat = [512]; NHndl = uicontrol( ... 'Style','edit', ... 'Units','normalized', ... 'Position',textPos, ... 'Max',1, ... 'Horiz','right', ... 'Background','white', ... 'Foreground','black', ... 'String',str,'Userdata',mat, ... 'callback',callbackStr); % coding gain label btnNumber=4; yPos=menutop-(btnNumber-1)*(btnHt+spacing); top = yPos - btnHt - spacing; labelWidth = frmWidth-textWidth-.01; labelBottom=top-textHeight; labelLeft = left; labelPos = [labelLeft labelBottom labelWidth textHeight]; h = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',labelPos, ... 'Horiz','left', ... 'String','Coding gain (dB)', ... 'Interruptible','off', ... 'BackgroundColor',[0.5 0.5 0.5], ... 'ForegroundColor','white'); % set coding gain textPos = [labelLeft+labelWidth-.015 labelBottom textWidth+.025 textHeight]; callbackStr = 'dualteq(''setCG'')'; str = sprintf('4.2'); mat = [4.2]; CGHndl = uicontrol( ... 'Style','edit', ... 'Units','normalized', ... 'Position',textPos, ... 'Max',1, ... 'Horiz','right', ... 'Background','white', ... 'Foreground','black', ... 'String',str,'Userdata',mat, ... 'callback',callbackStr); % Margin label btnNumber=5; yPos=menutop-(btnNumber-1)*(btnHt+spacing); top = yPos - btnHt - spacing; labelWidth = frmWidth-textWidth-.01; labelBottom=top-textHeight; labelLeft = left; labelPos = [labelLeft labelBottom labelWidth textHeight]; h = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',labelPos, ... 'Horiz','left', ... 'String','Margin (dB)', ... 'Interruptible','off', ... 'BackgroundColor',[0.5 0.5 0.5], ... 'ForegroundColor','white'); % set margin textPos = [labelLeft+labelWidth-.015 labelBottom textWidth+.025 textHeight]; callbackStr = 'dualteq(''setMargin'')'; str = sprintf('6'); mat = [6]; MarginHndl = uicontrol( ... 'Style','edit', ... 'Units','normalized', ... 'Position',textPos, ... 'Max',1, ... 'Horiz','right', ... 'Background','white', ... 'Foreground','black', ... 'String',str,'Userdata',mat, ... 'callback',callbackStr); % Dmin label btnNumber=6; yPos=menutop-(btnNumber-1)*(btnHt+spacing); top = yPos - btnHt - spacing; labelWidth = frmWidth-textWidth-.01; labelBottom=top-textHeight; labelLeft = left; labelPos = [labelLeft labelBottom labelWidth textHeight]; h = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',labelPos, ... 'Horiz','left', ... 'String','Dmin', ... 'Interruptible','off', ... 'BackgroundColor',[0.5 0.5 0.5], ... 'ForegroundColor','white'); % set Dmin textPos = [labelLeft+labelWidth-.015 labelBottom textWidth+.025 textHeight]; callbackStr = 'dualteq(''setDmin'')'; str = sprintf('15'); mat = [15]; DminHndl = uicontrol( ... 'Style','edit', ... 'Units','normalized', ... 'Position',textPos, ... 'Max',1, ... 'Horiz','right', ... 'Background','white', ... 'Foreground','black', ... 'String',str,'Userdata',mat, ... 'callback',callbackStr); % Dmax label btnNumber=7; yPos=menutop-(btnNumber-1)*(btnHt+spacing); top = yPos - btnHt - spacing; labelWidth = frmWidth-textWidth-.01; labelBottom=top-textHeight; labelLeft = left; labelPos = [labelLeft labelBottom labelWidth textHeight]; h = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',labelPos, ... 'Horiz','left', ... 'String','Dmax', ... 'Interruptible','off', ... 'BackgroundColor',[0.5 0.5 0.5], ... 'ForegroundColor','white'); % set Dmax textPos = [labelLeft+labelWidth-.015 labelBottom textWidth+.025 textHeight]; callbackStr = 'dualteq(''setDmax'')'; str = sprintf('35'); mat = [35]; DmaxHndl = uicontrol( ... 'Style','edit', ... 'Units','normalized', ... 'Position',textPos, ... 'Max',1, ... 'Horiz','right', ... 'Background','white', ... 'Foreground','black', ... 'String',str,'Userdata',mat, ... 'callback',callbackStr); % input power label btnNumber=8; yPos=menutop-(btnNumber-1)*(btnHt+spacing); top = yPos - btnHt - spacing; labelWidth = frmWidth-textWidth-.01; labelBottom=top-textHeight; labelLeft = left; labelPos = [labelLeft labelBottom labelWidth textHeight]; h = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',labelPos, ... 'Horiz','left', ... 'String','Input power (dBm)', ... 'Interruptible','off', ... 'BackgroundColor',[0.5 0.5 0.5], ... 'ForegroundColor','white'); % set input power textPos = [labelLeft+labelWidth-.015 labelBottom textWidth+.025 textHeight]; callbackStr = 'dualteq(''setPwr'')'; str = sprintf('23'); mat = [23]; PwrHndl = uicontrol( ... 'Style','edit', ... 'Units','normalized', ... 'Position',textPos, ... 'Max',1, ... 'Horiz','right', ... 'Background','white', ... 'Foreground','black', ... 'String',str,'Userdata',mat, ... 'callback',callbackStr); % AWGN power label btnNumber=9; yPos=menutop-(btnNumber-1)*(btnHt+spacing); top = yPos - btnHt - spacing; labelWidth = frmWidth-textWidth-.01; labelBottom=top-textHeight; labelLeft = left; labelPos = [labelLeft labelBottom labelWidth textHeight]; h = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',labelPos, ... 'Horiz','left', ... 'String','AWGN pow (dBm/Hz)', ... 'Interruptible','off', ... 'BackgroundColor',[0.5 0.5 0.5], ... 'ForegroundColor','white'); % set AWGN power textPos = [labelLeft+labelWidth-.015 labelBottom textWidth+.025 textHeight]; callbackStr = 'dualteq(''setAWGN'')'; str = sprintf('-140'); mat = [-140]; AWGNHndl = uicontrol( ... 'Style','edit', ... 'Units','normalized', ... 'Position',textPos, ... 'Max',1, ... 'Horiz','right', ... 'Background','white', ... 'Foreground','black', ... 'String',str,'Userdata',mat, ... 'callback',callbackStr); % channel number label btnNumber=10; yPos=menutop-(btnNumber-1)*(btnHt+spacing); top = yPos - btnHt - spacing; labelWidth = frmWidth-textWidth-.01; labelBottom=top-textHeight; labelLeft = left; labelPos = [labelLeft labelBottom labelWidth textHeight]; h = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',labelPos, ... 'Horiz','left', ... 'String','CSA loop # (1-8)', ... 'Interruptible','off', ... 'BackgroundColor',[0.5 0.5 0.5], ... 'ForegroundColor','white'); % set channel number textPos = [labelLeft+labelWidth-.015 labelBottom textWidth+.025 textHeight]; callbackStr = 'dualteq(''setCSA'')'; str = sprintf('1'); mat = [1]; CSAHndl = uicontrol( ... 'Style','edit', ... 'Units','normalized', ... 'Position',textPos, ... 'Max',1, ... 'Horiz','right', ... 'Background','white', ... 'Foreground','black', ... 'String',str,'Userdata',mat, ... 'callback',callbackStr); % graphic selection menu labelStr=['SNR & MFB| Target & shortened channel|TEQ impulse response|'... 'TEQ frequency response|Original & shortened channel'... '|Noise Power Spectrum|Delay Plot|Equalized channel freq resp|SNR & MFB 2']; callbackStr='dualteq(''plotGraph'');'; mat = 1; viewHndl=uicontrol( ... 'Style','popupmenu', ... 'Units','normalized', ... 'Position',[left frmBottom+2*(btnHt+spacing) btnWid btnHt], ... 'String',labelStr,'Userdata',mat, ... 'Interruptible','on', ... 'Callback',callbackStr); % help button labelStr='Info'; callbackStr='dualteq(''info'')'; helpHndl=uicontrol( ... 'Style','pushbutton', ... 'Units','normalized', ... 'Position',[left frmBottom+btnHt+spacing btnWid btnHt], ... 'String',labelStr, ... 'Callback',callbackStr); % run button labelStr='Calculate'; callbackStr='dualteq(''design'')'; closeHndl=uicontrol( ... 'Style','pushbutton', ... 'Units','normalized', ... 'Position',[left frmBottom btnWid btnHt], ... 'String',labelStr, ... 'Callback',callbackStr);
% Umin label yPos=frmBottom-frmBorder+0.06; labelPos = [grpleft yPos labelWidth textHeight]; h = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',labelPos, ... 'Horiz','left', ... 'String','Umin', ... 'Interruptible','off', ... 'BackgroundColor',[0.5 0.5 0.5], ... 'ForegroundColor','white'); % set Umin
yPos=frmBottom-frmBorder+0.06; textPos = [grpleft+labelWidth-.015 yPos textWidth textHeight]; callbackStr = 'dualteq(''setUmin'')'; str = sprintf('39'); mat = [39]; UminHndl = uicontrol( ... 'Style','edit', ... 'Units','normalized', ... 'Position',textPos, ... 'Max',1, ... 'Horiz','right', ... 'Background','white', ... 'Foreground','black', ... 'String',str,'Userdata',mat, ... 'callback',callbackStr); % Umax label yPos=frmBottom-frmBorder+0.06; labelPos = [grpleft+labelWidth+.1 yPos labelWidth textHeight]; h = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',labelPos, ... 'Horiz','left', ... 'String','Umax', ... 'Interruptible','off', ... 'BackgroundColor',[0.5 0.5 0.5], ... 'ForegroundColor','white'); % set Umax yPos=frmBottom-frmBorder+0.06;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -