⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dualteq.m

📁 ADSL经典仿真程序
💻 M
📖 第 1 页 / 共 4 页
字号:
      '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 & Matched Filter Bound|Shortened channel|TEQ impulse response|'...         'TEQ frequency response|Original & shortened channel'...         '|Noise Power Spectrum|Delay Plot|Equalized channel freq resp|SNR & Matched Filter Bound 2'];   callbackStr='dualteq(''plotGraph'');';   mat = 1;   viewHndl=uicontrol( ...      'Style','popupmenu', ...      'Units','normalized', ...      'Position',[left frmBottom+3*(btnHt+spacing) btnWid btnHt], ...      'String',labelStr,'Userdata',mat, ...      'Interruptible','on', ...      'Callback',callbackStr);      % run button   labelStr='Calculate';   callbackStr='dualteq(''design'')';   closeHndl=uicontrol( ...      'Style','pushbutton', ...      'Units','normalized', ...      'Position',[left frmBottom+2*(btnHt+spacing) btnWid btnHt], ...      'String',labelStr, ...      'Callback',callbackStr);     % save teq button   labelStr='Save Equalizer';   callbackStr='dualteq(''savedualteq'')';   helpHndl=uicontrol( ...      'Style','pushbutton', ...      'Units','normalized', ...      'Position',[left frmBottom+btnHt+spacing btnWid/2 btnHt], ...      'String',labelStr, ...      'Callback',callbackStr);       % save all button   labelStr='Save Parameters';   callbackStr='dualteq(''saveall'')';   helpHndl=uicontrol( ...      'Style','pushbutton', ...      'Units','normalized', ...      'Position',[left+btnWid/2 frmBottom+btnHt+spacing btnWid/2 btnHt], ...      'String',labelStr, ...      'Callback',callbackStr);     % help button   labelStr='Information';   callbackStr='dualteq(''info'')';   helpHndl=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-.02  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;   textPos = [grpleft+labelWidth+0.05+labelWidth  yPos textWidth textHeight];   callbackStr = 'dualteq(''setUmax'')';   str = sprintf('250');   mat = [250];   UmaxHndl = uicontrol( ...      'Style','edit', ...      'Units','normalized', ...      'Position',textPos, ...      'Max',1, ...       'Horiz','right', ...      'Background','white', ...      'Foreground','black', ...      'String',str,'Userdata',mat, ...      'callback',callbackStr);   
      % Cmin label   yPos=frmBottom-frmBorder;   labelPos = [grpleft yPos labelWidth textHeight];   h = uicontrol( ...      'Style','text', ...      'Units','normalized', ...      'Position',labelPos, ...      'Horiz','left', ...      'String','Cmin', ...      'Interruptible','off', ...      'BackgroundColor',[0.5 0.5 0.5], ...      'ForegroundColor','white');      % set Cmin   textPos = [grpleft+labelWidth-.02  yPos textWidth textHeight];   callbackStr = 'dualteq(''setCmin'')';   str = sprintf('39');   mat = [39];   CminHndl = uicontrol( ...      'Style','edit', ...      'Units','normalized', ...      'Position',textPos, ...      'Max',1, ...       'Horiz','right', ...      'Background','white', ...      'Foreground','black', ...      'String',str,'Userdata',mat, ...      'callback',callbackStr);      % Cmax label   yPos=frmBottom-frmBorder;   labelPos = [grpleft+labelWidth+.1  yPos labelWidth textHeight];   h = uicontrol( ...      'Style','text', ...

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -