📄 soundgui.m
字号:
function SoundGUI()
% This is the machine-generated representation of a MATLAB object
% and its children. Note that handle values may change when these
% objects are re-created. This may cause problems with some callbacks.
% The command syntax may be supported in the future, but is currently
% incomplete and subject to change.
%
% To re-open this system, just type the name of the m-file at the MATLAB
% prompt. The M-file and its associtated MAT-file must be on your path.
load SoundGUI
a = figure('Color',[0.9 0.9 0.9], ...
'Colormap',mat0, ...
'CreateFcn','OFDMguiFn figure', ...
'Position',[376 239 624 480], ...
'Resize','off', ...
'Tag','Fig1');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'FontName','Monaco', ...
'HorizontalAlignment','left', ...
'Position',[59 2 340 94], ...
'String','Sound OFDM Demo', ...
'Style','text', ...
'Tag','StaticTextFeedback');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.3 0.3 0.3], ...
'Position',[472 -1 152 481], ...
'Style','frame', ...
'Tag','Frame1');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','OFDMguiFnSound next', ...
'FontSize',14, ...
'Position',[493 435 102 32], ...
'String','Begin', ...
'Tag','PushbuttonNext');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','OFDMguiFnSound close', ...
'FontSize',14, ...
'Position',[493 10 102 32], ...
'String','Close', ...
'Tag','PushbuttonClose');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','OFDMguiFnSound mp_channel', ...
'Enable','off', ...
'Position',[489 209 87 30], ...
'String',mat1, ...
'Style','popupmenu', ...
'Tag','PopupMenuMultipath', ...
'Value',2, ...
'Visible','off');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Enable','off', ...
'FontWeight','bold', ...
'Position',[489 251 129 17], ...
'String','Multipath Channel', ...
'Style','text', ...
'Tag','StaticTextMultipath', ...
'Visible','off');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'FontWeight','bold', ...
'Position',[489 398 129 18], ...
'String','Generated Sounds', ...
'Style','text', ...
'Tag','StaticTextGenSounds', ...
'Visible','off');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','OFDMguiFnSound PlayOriginal', ...
'FontSize',14, ...
'Position',[489 364 107 28], ...
'String','Original', ...
'Tag','PushbuttonOriginal', ...
'Visible','off');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','OFDMguiFnSound PlayQAM', ...
'FontSize',14, ...
'Position',[489 329 107 28], ...
'String','QAM', ...
'Tag','PushbuttonQAM', ...
'Visible','off');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','OFDMguiFnSound PlayOFDM', ...
'FontSize',14, ...
'Position',[489 293 107 28], ...
'String','OFDM', ...
'Tag','PushbuttonOFDM', ...
'Visible','off');
b = axes('Parent',a, ...
'Units','points', ...
'Box','on', ...
'CameraUpVector',[0 1 0], ...
'CameraUpVectorMode','manual', ...
'Color',[1 1 1], ...
'ColorOrder',mat2, ...
'Position',[51 363 361 84], ...
'Tag','AxesOriginal', ...
'XColor',[0 0 0], ...
'YColor',[0 0 0], ...
'ZColor',[0 0 0]);
c = line('Parent',b, ...
'Color',[0 0 1], ...
'Tag','Line1', ...
'XData',1, ...
'YData',0);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','center', ...
'Position',[0.997222 -1.37349 0], ...
'Tag','Text13', ...
'VerticalAlignment','cap');
set(get(c,'Parent'),'XLabel',c);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','center', ...
'Position',[-0.141667 2.22045e-16 0], ...
'Rotation',90, ...
'Tag','Text14', ...
'VerticalAlignment','baseline');
set(get(c,'Parent'),'YLabel',c);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','right', ...
'Position',[-0.286111 1.80723 0], ...
'Tag','Text15', ...
'Visible','off');
set(get(c,'Parent'),'ZLabel',c);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','center', ...
'Position',[0.997222 1.13253 0], ...
'Tag','Text16', ...
'VerticalAlignment','bottom');
set(get(c,'Parent'),'Title',c);
b = axes('Parent',a, ...
'Units','points', ...
'Box','on', ...
'CameraUpVector',[0 1 0], ...
'CameraUpVectorMode','manual', ...
'Color',[1 1 1], ...
'ColorOrder',mat3, ...
'Position',[51 249 363 82], ...
'Tag','AxesQAM', ...
'XColor',[0 0 0], ...
'YColor',[0 0 0], ...
'ZColor',[0 0 0]);
c = line('Parent',b, ...
'Color',[0 0 1], ...
'Tag','Line2', ...
'XData',1, ...
'YData',0);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','center', ...
'Position',[0.997238 -1.38272 0], ...
'Tag','Text9', ...
'VerticalAlignment','cap');
set(get(c,'Parent'),'XLabel',c);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','center', ...
'Position',[-0.140884 0 0], ...
'Rotation',90, ...
'Tag','Text10', ...
'VerticalAlignment','baseline');
set(get(c,'Parent'),'YLabel',c);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','right', ...
'Position',[-0.28453 4.69136 0], ...
'Tag','Text11', ...
'Visible','off');
set(get(c,'Parent'),'ZLabel',c);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','center', ...
'Position',[0.997238 1.1358 0], ...
'Tag','Text12', ...
'VerticalAlignment','bottom');
set(get(c,'Parent'),'Title',c);
b = axes('Parent',a, ...
'Units','points', ...
'Box','on', ...
'CameraUpVector',[0 1 0], ...
'CameraUpVectorMode','manual', ...
'Color',[1 1 1], ...
'ColorOrder',mat4, ...
'Position',[51 138 360 78], ...
'Tag','AxesOFDM', ...
'XColor',[0 0 0], ...
'YColor',[0 0 0], ...
'ZColor',[0 0 0]);
c = line('Parent',b, ...
'Color',[0 0 1], ...
'Tag','Line3', ...
'XData',1, ...
'YData',0);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','center', ...
'Position',[1 -1.4026 0], ...
'Tag','Text5', ...
'VerticalAlignment','cap');
set(get(c,'Parent'),'XLabel',c);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','center', ...
'Position',[-0.091922 0 0], ...
'Rotation',90, ...
'Tag','Text6', ...
'VerticalAlignment','baseline');
set(get(c,'Parent'),'YLabel',c);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','right', ...
'Position',[-0.286908 7.87013 0], ...
'Tag','Text7', ...
'Visible','off');
set(get(c,'Parent'),'ZLabel',c);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','center', ...
'Position',[1 1.14286 0], ...
'Tag','Text8', ...
'VerticalAlignment','bottom');
set(get(c,'Parent'),'Title',c);
b = axes('Parent',a, ...
'Units','points', ...
'Box','on', ...
'CameraUpVector',[0 1 0], ...
'CameraUpVectorMode','manual', ...
'Color',[1 1 1], ...
'ColorOrder',mat5, ...
'Position',[30 120 396 335], ...
'Tag','Axes1', ...
'XColor',[0 0 0], ...
'YColor',[0 0 0], ...
'ZColor',[0 0 0]);
c = line('Parent',b, ...
'Color',[0 0 1], ...
'Tag','Line4', ...
'XData',1, ...
'YData',0);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','center', ...
'Position',[1 -1.09281 0], ...
'Tag','Text1', ...
'VerticalAlignment','cap');
set(get(c,'Parent'),'XLabel',c);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','center', ...
'Position',[-0.129114 0.00299401 0], ...
'Rotation',90, ...
'Tag','Text2', ...
'VerticalAlignment','baseline');
set(get(c,'Parent'),'YLabel',c);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','right', ...
'Position',[-0.15443 1.15269 0], ...
'Tag','Text3');
set(get(c,'Parent'),'ZLabel',c);
c = text('Parent',b, ...
'Color',[0 0 0], ...
'HandleVisibility','callback', ...
'HorizontalAlignment','center', ...
'Position',[1 1.03293 0], ...
'Tag','Text4', ...
'VerticalAlignment','bottom');
set(get(c,'Parent'),'Title',c);
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'FontWeight','bold', ...
'Position',[489 162 129 18], ...
'String','Longer Sounds', ...
'Style','text', ...
'Tag','StaticTextLongSounds', ...
'Visible','off');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','OFDMguiFnSound PlayQAMLong', ...
'FontSize',14, ...
'Position',[491 92 107 28], ...
'String','QAM', ...
'Tag','PushbuttonQAMLong', ...
'Visible','off');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','OFDMguiFnSound PlayOFDMLong', ...
'FontSize',14, ...
'Position',[491 58 107 28], ...
'String','OFDM', ...
'Tag','PushbuttonOFDMLong', ...
'Visible','off');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.733333 0.733333 0.733333], ...
'Callback','OFDMguiFnSound PlayOriginalLong', ...
'FontSize',14, ...
'Position',[491 126 107 28], ...
'String','Original', ...
'Tag','PushbuttonOriginalLong', ...
'Visible','off');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.9 0.9 0.9], ...
'Position',[414 284 36 15], ...
'String','BER=', ...
'Style','text', ...
'Tag','StaticTextBER2', ...
'Visible','off');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[0.9 0.9 0.9], ...
'Position',[414 176 36 15], ...
'String','BER=', ...
'Style','text', ...
'Tag','StaticTextBER1', ...
'Visible','off');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'HorizontalAlignment','left', ...
'Position',[418 263 48 20], ...
'Style','text', ...
'Tag','StaticTextBERQAM', ...
'Visible','off');
b = uicontrol('Parent',a, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'HorizontalAlignment','left', ...
'Position',[419 157 49 17], ...
'Style','text', ...
'Tag','StaticTextBEROFDM', ...
'Visible','off');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -