📄 dualteq.m
字号:
% dualteq Demonstrates dual-path time domain equalizers design functions% in the DMTTEQ Toolbox.%% To start the demo type "dualteq".%% For more information use the "info" button after starting% the demo.% Copyright (c) 1999-2002 The University of Texas% All Rights Reserved.% % This program is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 2 of the License, or% (at your option) any later version.% % This program is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the% GNU General Public License for more details.% % The GNU Public License is available in the file LICENSE, or you% can write to the Free Software Foundation, Inc., 59 Temple Place -% Suite 330, Boston, MA 02111-1307, USA, or you can find it on the% World Wide Web at http://www.fsf.org.% % Programmers: Ming Ding and Guner Arslan% Version: @(#)dualteq.m 1.0 01/14/02% % The authors are with the Department of Electrical and Computer% Engineering, The University of Texas at Austin, Austin, TX.% They can be reached at ming@ece.utexas.edu.% Ming Ding is also with the Embedded Signal Processing% Laboratory in the Dept. of ECE., http://anchovy.ece.utexas.edu.function dualteq(action);if nargin < 1, action='init';end;if strcmp(action,'init'), %close all; shh = get(0,'showHiddenHandles'); set(0,'showHiddenHandles','on') figNumber=figure( ... 'Name','Dual-path TEQ Design Demo', ... 'ToolBar','figure',... 'handlevisibility','callback',... 'IntegerHandle','off',... 'NumberTitle','off',... 'Position',[232 255 575 423]); set(gcf,'Pointer','watch'); % figure parameters labelColor=[0.8 0.8 0.8]; yInitPos=0.90; menutop=0.95; btnTop = 0.6; top=0.75; left=0.685; btnWid=0.275; btnHt=0.06; textHeight = 0.05; textWidth = 0.06; spacing=0.005; resWidth = 0.55; resHeight = 0.12; grpleft = 0.09; grpbuttom = 0.3; % graph axis setup axesposition = [grpleft grpbuttom+0.05 0.55 0.6]; axes( ... 'Units','normalized', ... 'Position',axesposition, ... 'XTick',[],'YTick',[], ... 'Box','on'); set(figNumber,'defaultaxesposition',axesposition) freqzHnd = subplot(1,1,1); set(gca, ... 'Units','normalized', ... 'Position',axesposition, ... 'XTick',[],'YTick',[], ... 'Box','on'); % console frame setup frmBorder=0.019; frmBottom=0.04; frmHeight = 0.92; frmWidth = btnWid; yPos=frmBottom-frmBorder; frmPos=[left-frmBorder yPos frmWidth+2*frmBorder frmHeight+2*frmBorder]; h=uicontrol( ... 'Style','frame', ... 'Units','normalized', ... 'Position',frmPos, ... 'BackgroundColor',[0.5 0.5 0.5]); % result frame setup numColumn = 6; numRow = 2; border = 0.002; tabWidth = (resWidth - (numColumn + 1) * border) / numColumn; tabHeight = (resHeight - (numRow + 1) * border) / numRow; resyPos = yPos+tabHeight+border+0.1; resfrmPos=[grpleft resyPos resWidth resHeight+border]; h=uicontrol( ... 'Style','frame', ... 'Units','normalized', ... 'Position',resfrmPos, ... 'BackgroundColor',[0.5 0.5 0.5]); % result table entries gridNum = [1 1]; tabBottom = resyPos + border + (border+tabHeight)*(gridNum(2)-1); tabLeft = grpleft+ border + (border+tabWidth)*(gridNum(1)-1); tabPos = [tabLeft tabBottom tabWidth tabHeight]; h11 = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',tabPos, ... 'Horiz','center', ... 'String',' ', ... 'Interruptible','off', ... 'BackgroundColor','white', ... 'ForegroundColor','black'); gridNum = [1 2]; tabBottom = resyPos+border + (border+tabHeight)*(gridNum(2)-1); tabLeft = grpleft+ border + (border+tabWidth)*(gridNum(1)-1); tabPos = [tabLeft tabBottom tabWidth tabHeight]; h12 = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',tabPos, ... 'Horiz','center', ... 'String','Rate1', ... 'Interruptible','off', ... 'BackgroundColor','white', ... 'ForegroundColor','black'); gridNum = [2 1]; tabBottom = resyPos+border + (border+tabHeight)*(gridNum(2)-1); tabLeft = grpleft+ border + (border+tabWidth)*(gridNum(1)-1); tabPos = [tabLeft tabBottom tabWidth tabHeight]; h21 = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',tabPos, ... 'Horiz','center', ... 'String','', ... 'Interruptible','off', ... 'BackgroundColor','white', ... 'ForegroundColor','black'); gridNum = [2 2]; tabBottom = resyPos+border + (border+tabHeight)*(gridNum(2)-1); tabLeft = grpleft+ border + (border+tabWidth)*(gridNum(1)-1); tabPos = [tabLeft tabBottom tabWidth tabHeight]; h22 = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',tabPos, ... 'Horiz','center', ... 'String','Rate2', ... 'Interruptible','off', ... 'BackgroundColor','white', ... 'ForegroundColor','black'); gridNum = [3 1]; tabBottom = resyPos+border + (border+tabHeight)*(gridNum(2)-1); tabLeft = grpleft+ border + (border+tabWidth)*(gridNum(1)-1); tabPos = [tabLeft tabBottom tabWidth tabHeight]; h31 = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',tabPos, ... 'Horiz','center', ... 'String','', ... 'Interruptible','off', ... 'BackgroundColor','white', ... 'ForegroundColor','black'); gridNum = [3 2]; tabBottom = resyPos+border + (border+tabHeight)*(gridNum(2)-1); tabLeft = grpleft+ border + (border+tabWidth)*(gridNum(1)-1); tabPos = [tabLeft tabBottom tabWidth tabHeight]; h32 = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',tabPos, ... 'Horiz','center', ... 'String','RateDual', ... 'Interruptible','off', ... 'BackgroundColor','white', ... 'ForegroundColor','black'); gridNum = [4 1]; tabBottom = resyPos+border + (border+tabHeight)*(gridNum(2)-1); tabLeft = grpleft+ border + (border+tabWidth)*(gridNum(1)-1); tabPos = [tabLeft tabBottom tabWidth tabHeight]; h41 = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',tabPos, ... 'Horiz','center', ... 'String','', ... 'Interruptible','off', ... 'BackgroundColor','white', ... 'ForegroundColor','black'); gridNum = [4 2]; tabBottom = resyPos+border + (border+tabHeight)*(gridNum(2)-1); tabLeft = grpleft+ border + (border+tabWidth)*(gridNum(1)-1); tabPos = [tabLeft tabBottom tabWidth tabHeight]; h42 = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',tabPos, ... 'Horiz','center', ... 'String','SSNR1', ... 'Interruptible','off', ... 'BackgroundColor','white', ... 'ForegroundColor','black'); gridNum = [5 1]; tabBottom = resyPos+border + (border+tabHeight)*(gridNum(2)-1); tabLeft = grpleft+ border + (border+tabWidth)*(gridNum(1)-1); tabPos = [tabLeft tabBottom tabWidth tabHeight]; h51 = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',tabPos, ... 'Horiz','center', ... 'String','', ... 'Interruptible','off', ... 'BackgroundColor','white', ... 'ForegroundColor','black'); gridNum = [5 2]; tabBottom = resyPos+border + (border+tabHeight)*(gridNum(2)-1); tabLeft = grpleft+ border + (border+tabWidth)*(gridNum(1)-1); tabPos = [tabLeft tabBottom tabWidth tabHeight]; h52 = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',tabPos, ... 'Horiz','center', ... 'String','SSNR2', ... 'Interruptible','off', ... 'BackgroundColor','white', ... 'ForegroundColor','black'); gridNum = [6 1]; tabBottom = resyPos+border + (border+tabHeight)*(gridNum(2)-1); tabLeft = grpleft+ border + (border+tabWidth)*(gridNum(1)-1); tabPos = [tabLeft tabBottom tabWidth tabHeight]; h61 = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',tabPos, ... 'Horiz','center', ... 'String','', ... 'Interruptible','off', ... 'BackgroundColor','white', ... 'ForegroundColor','black'); gridNum = [6 2]; tabBottom = resyPos+border + (border+tabHeight)*(gridNum(2)-1); tabLeft = grpleft+ border + (border+tabWidth)*(gridNum(1)-1); tabPos = [tabLeft tabBottom tabWidth tabHeight]; h62 = uicontrol( ... 'Style','text', ... 'Units','normalized', ... 'Position',tabPos, ... 'Horiz','center', ... 'String','MaxRate 1-FIR', ... 'Interruptible','off', ... 'BackgroundColor','white', ... 'ForegroundColor','black'); % TEQ Design Routine Selection Menu btnNumber=1; yPos=menutop-(btnNumber-1)*(btnHt+spacing); btnPos=[left yPos-btnHt btnWid btnHt]; labelStr='Min-ISI|MBR';
callbackStr='dualteq(''changemethod'');'; methodHndl=uicontrol( ... 'Style','popupmenu', ... 'Units','normalized', ... 'Position',btnPos, ... 'String',labelStr, ... 'Interruptible','on', ... 'Callback',callbackStr); % Nb label btnNumber=1; 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','SIR length (Nb)', ... 'Interruptible','off', ... 'BackgroundColor',[0.5 0.5 0.5], ... 'ForegroundColor','white'); % set Nb textPos = [labelLeft+labelWidth-.015 labelBottom textWidth+.025 textHeight]; callbackStr = 'dualteq(''setNb'')'; str = sprintf('32'); mat = [32]; NbHndl = uicontrol( ... 'Style','edit', ... 'Units','normalized', ... 'Position',textPos, ... 'Max',1, ... 'Horiz','right', ... 'Background','white', ... 'Foreground','black', ... 'String',str,'Userdata',mat, ... 'callback',callbackStr); % Nw label btnNumber=2; 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','TEQ length (Nw)', ... 'Interruptible','off', ... 'BackgroundColor',[0.5 0.5 0.5], ... 'ForegroundColor','white'); % set Nw textPos = [labelLeft+labelWidth-.015 labelBottom textWidth+.025 textHeight]; callbackStr = 'dualteq(''setNw'')'; str = sprintf('5'); mat = [5]; NwHndl = uicontrol( ... 'Style','edit', ... 'Units','normalized', ... 'Position',textPos, ... 'Max',1, ...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -