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

📄 txtester_export.m

📁 一个仿真测试4FSK信号的matlab环境GUI程序。可以查看基带IQ波形、眼图、星座图。并可以仿真高斯白噪声、瑞利衰减对信号的影响。
💻 M
📖 第 1 页 / 共 5 页
字号:
function edt_PlotNum_From_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edt_PlotNum_from (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), ...
        get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end




% --- Executes on button press in chkb_NewFigure.
function chkb_NewFigure_Callback(hObject, eventdata, handles)


% --- Executes on mouse press over axes background.
function axes_main_ButtonDownFcn(hObject, eventdata, handles)
ax = get(handles.axes_main, 'CurrentPoint');
%assignin('base','a',a);
set(handles.txt_CursorAxis, 'string', ...
    sprintf('x: %f,  y: %f,  z: %f',ax(1,1),ax(1,2),ax(1,3)));
axes(handles.axes_main);
hold on;
plot(ax(1,1),ax(1,2), 'rd');
%text(ax(1,1),ax(1,2), 'o')
hold off;


function param = GetParam(handles)
param.mod.Fd = str2num(get(handles.edt_Mod_Fd, 'string'));
param.mod.Index = str2num(get(handles.edt_Mod_Index, 'string'));
param.mod.nSamp = str2num(get(handles.edt_Mod_nSamp, 'string'));

param.rrc.Order = str2num(get(handles.edt_RRC_Order, 'string'));
param.rrc.OverSamp = str2num(get(handles.edt_RRC_OverSamp, 'string'));
param.rrc.RollOff = str2num(get(handles.edt_RRC_RollOff, 'string'));
param.rrc.Delay = param.rrc.Order/(2*param.rrc.OverSamp);

% ====================================================================
% --- Executes on selection change in list_Signal.
function list_Signal_Callback(hObject, eventdata, handles)
if strcmp(get(handles.list_Signal, 'string'), '<empty>'),
    return
else
    val = get(handles.list_Signal, 'value');
    switch val
        case {1,2,5,6,9,11}
            set(handles.btn_Plot, 'enable', 'on');
            set([handles.btn_Plot3, handles.btn_Polar], 'enable', 'off');
        case {3,7}
            set([handles.btn_Plot, handles.btn_Plot3, ...
                handles.btn_Polar], 'enable', 'on');
        case {4,8,10}
            set([handles.btn_Plot, handles.btn_Plot3, ...
                handles.btn_Polar], 'enable', 'off');
        otherwise
            return
    end
end

% --- Executes during object creation, after setting all properties.
function list_Signal_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), ...
        get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end




% --- Creates and returns a handle to the GUI figure. 
function h1 = TxTester_export_LayoutFcn(policy)
% policy - create a new figure or use a singleton. 'new' or 'reuse'.

persistent hsingleton;
if strcmpi(policy, 'reuse') & ishandle(hsingleton)
    h1 = hsingleton;
    return;
end

appdata = [];
appdata.GUIDEOptions = struct(...
    'active_h', [], ...
    'taginfo', struct(...
    'figure', 2, ...
    'uipanel', 11, ...
    'edit', 9, ...
    'listbox', 2, ...
    'axes', 2, ...
    'text', 19, ...
    'popupmenu', 3, ...
    'pushbutton', 14, ...
    'radiobutton', 3, ...
    'frame', 5, ...
    'slider', 3, ...
    'checkbox', 2), ...
    'override', 0, ...
    'release', 13, ...
    'resize', 'none', ...
    'accessibility', 'callback', ...
    'mfile', 1, ...
    'callbacks', 1, ...
    'singleton', 1, ...
    'syscolorfig', 1, ...
    'blocking', 0, ...
    'lastSavedFile', 'E:\MATLAB701\work\DviewSoft\TxTester_export.m');
appdata.lastValidTag = 'TxTester';
appdata.GUIDELayoutEditor = [];

h1 = figure(...
'Units','normalized',...
'PaperUnits',get(0,'defaultfigurePaperUnits'),...
'CloseRequestFcn','my_closereq(guidata(gcf))',...
'Color',[0.831372549019608 0.815686274509804 0.784313725490196],...
'Colormap',[0 0 0.5625;0 0 0.625;0 0 0.6875;0 0 0.75;0 0 0.8125;0 0 0.875;0 0 0.9375;0 0 1;0 0.0625 1;0 0.125 1;0 0.1875 1;0 0.25 1;0 0.3125 1;0 0.375 1;0 0.4375 1;0 0.5 1;0 0.5625 1;0 0.625 1;0 0.6875 1;0 0.75 1;0 0.8125 1;0 0.875 1;0 0.9375 1;0 1 1;0.0625 1 1;0.125 1 0.9375;0.1875 1 0.875;0.25 1 0.8125;0.3125 1 0.75;0.375 1 0.6875;0.4375 1 0.625;0.5 1 0.5625;0.5625 1 0.5;0.625 1 0.4375;0.6875 1 0.375;0.75 1 0.3125;0.8125 1 0.25;0.875 1 0.1875;0.9375 1 0.125;1 1 0.0625;1 1 0;1 0.9375 0;1 0.875 0;1 0.8125 0;1 0.75 0;1 0.6875 0;1 0.625 0;1 0.5625 0;1 0.5 0;1 0.4375 0;1 0.375 0;1 0.3125 0;1 0.25 0;1 0.1875 0;1 0.125 0;1 0.0625 0;1 0 0;0.9375 0 0;0.875 0 0;0.8125 0 0;0.75 0 0;0.6875 0 0;0.625 0 0;0.5625 0 0],...
'IntegerHandle','off',...
'InvertHardcopy',get(0,'defaultfigureInvertHardcopy'),...
'Name','TxTester',...
'NumberTitle','off',...
'PaperPosition',get(0,'defaultfigurePaperPosition'),...
'PaperSize',[20.98404194812 29.67743169791],...
'PaperType',get(0,'defaultfigurePaperType'),...
'Position',[0.2 0.2 0.7001953125 0.641927083333333],...
'ToolBar','figure',...
'HandleVisibility','callback',...
'Tag','TxTester',...
'UserData',[],...
'Behavior',get(0,'defaultfigureBehavior'),...
'Visible','on',...
'CreateFcn', {@local_CreateFcn, '', appdata} );

appdata = [];
appdata.lastValidTag = 'uipanel1';

h2 = uipanel(...
'Parent',h1,...
'BorderType','beveledin',...
'Title','',...
'Position',[0 0.219 0.745 0.776],...
'Tag','uipanel1',...
'Behavior',get(0,'defaultuipanelBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

appdata = [];
appdata.lastValidTag = 'axes_main';

h3 = axes(...
'Parent',h2,...
'Position',[0.430451127819549 0.400523560209424 0.515037593984962 0.515706806282723],...
'Box','on',...
'CameraPosition',[0.5 0.5 9.16025403784439],...
'CameraPositionMode',get(0,'defaultaxesCameraPositionMode'),...
'Color',get(0,'defaultaxesColor'),...
'ColorOrder',get(0,'defaultaxesColorOrder'),...
'LooseInset',[0.186415094339623 0.16808 0.13622641509434 0.1146],...
'XColor',get(0,'defaultaxesXColor'),...
'XGrid','on',...
'XMinorTick','on',...
'YColor',get(0,'defaultaxesYColor'),...
'YGrid','on',...
'YMinorTick','on',...
'ZColor',get(0,'defaultaxesZColor'),...
'ButtonDownFcn','TxTester_export(''axes_main_ButtonDownFcn'',gcbo,[],guidata(gcbo))',...
'Tag','axes_main',...
'Behavior',get(0,'defaultaxesBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

h4 = get(h3,'title');

set(h4,...
'Parent',h3,...
'Units','data',...
'FontUnits','points',...
'BackgroundColor','none',...
'Color',[0 0 0],...
'EdgeColor','none',...
'EraseMode','normal',...
'DVIMode','auto',...
'FontAngle','normal',...
'FontName','Helvetica',...
'FontSize',10,...
'FontWeight','normal',...
'HorizontalAlignment','center',...
'LineStyle','-',...
'LineWidth',0.5,...
'Margin',2,...
'Position',[0.498175182481752 1.03299492385787 1.00005459937205],...
'Rotation',0,...
'String','',...
'Interpreter','tex',...
'VerticalAlignment','bottom',...
'ButtonDownFcn',[],...
'CreateFcn', {@local_CreateFcn, [], ''} ,...
'DeleteFcn',[],...
'BusyAction','queue',...
'HandleVisibility','off',...
'HelpTopicKey','',...
'HitTest','on',...
'Interruptible','on',...
'SelectionHighlight','on',...
'Serializable','on',...
'Tag','',...
'UserData',[],...
'Behavior',struct(),...
'Visible','on',...
'XLimInclude','on',...
'YLimInclude','on',...
'ZLimInclude','on',...
'CLimInclude','on',...
'ALimInclude','on',...
'Clipping','off');

h5 = get(h3,'xlabel');

set(h5,...
'Parent',h3,...
'Units','data',...
'FontUnits','points',...
'BackgroundColor','none',...
'Color',[0 0 0],...
'EdgeColor','none',...
'EraseMode','normal',...
'DVIMode','auto',...
'FontAngle','normal',...
'FontName','Helvetica',...
'FontSize',10,...
'FontWeight','normal',...
'HorizontalAlignment','center',...
'LineStyle','-',...
'LineWidth',0.5,...
'Margin',2,...
'Position',[0.498175182481752 -0.119289340101523 1.00005459937205],...
'Rotation',0,...
'String','',...
'Interpreter','tex',...
'VerticalAlignment','cap',...
'ButtonDownFcn',[],...
'CreateFcn', {@local_CreateFcn, [], ''} ,...
'DeleteFcn',[],...
'BusyAction','queue',...
'HandleVisibility','off',...
'HelpTopicKey','',...
'HitTest','on',...
'Interruptible','on',...
'SelectionHighlight','on',...
'Serializable','on',...
'Tag','',...
'UserData',[],...
'Behavior',struct(),...
'Visible','on',...
'XLimInclude','on',...
'YLimInclude','on',...
'ZLimInclude','on',...
'CLimInclude','on',...
'ALimInclude','on',...
'Clipping','off');

h6 = get(h3,'ylabel');

set(h6,...
'Parent',h3,...
'Units','data',...
'FontUnits','points',...
'BackgroundColor','none',...
'Color',[0 0 0],...
'EdgeColor','none',...
'EraseMode','normal',...
'DVIMode','auto',...
'FontAngle','normal',...
'FontName','Helvetica',...
'FontSize',10,...
'FontWeight','normal',...
'HorizontalAlignment','center',...
'LineStyle','-',...
'LineWidth',0.5,...
'Margin',2,...
'Position',[-0.104014598540146 0.49492385786802 1.00005459937205],...
'Rotation',90,...
'String','',...
'Interpreter','tex',...
'VerticalAlignment','bottom',...
'ButtonDownFcn',[],...
'CreateFcn', {@local_CreateFcn, [], ''} ,...
'DeleteFcn',[],...
'BusyAction','queue',...
'HandleVisibility','off',...
'HelpTopicKey','',...
'HitTest','on',...
'Interruptible','on',...
'SelectionHighlight','on',...
'Serializable','on',...
'Tag','',...
'UserData',[],...
'Behavior',struct(),...
'Visible','on',...
'XLimInclude','on',...
'YLimInclude','on',...
'ZLimInclude','on',...
'CLimInclude','on',...
'ALimInclude','on',...
'Clipping','off');

h7 = get(h3,'zlabel');

set(h7,...
'Parent',h3,...
'Units','data',...
'FontUnits','points',...
'BackgroundColor','none',...
'Color',[0 0 0],...
'EdgeColor','none',...
'EraseMode','normal',...
'DVIMode','auto',...
'FontAngle','normal',...
'FontName','Helvetica',...
'FontSize',10,...
'FontWeight','normal',...
'HorizontalAlignment','right',...
'LineStyle','-',...
'LineWidth',0.5,...
'Margin',2,...
'Position',[-0.841240875912409 1.16497461928934 1.00005459937205],...
'Rotation',0,...
'String','',...
'Interpreter','tex',...
'VerticalAlignment','middle',...
'ButtonDownFcn',[],...
'CreateFcn', {@local_CreateFcn, [], ''} ,...
'DeleteFcn',[],...
'BusyAction','queue',...
'HandleVisibility','off',...
'HelpTopicKey','',...
'HitTest','on',...
'Interruptible','on',...
'SelectionHighlight','on',...
'Serializable','on',...
'Tag','',...
'UserData',[],...
'Behavior',struct(),...
'Visible','off',...
'XLimInclude','on',...
'YLimInclude','on',...
'ZLimInclude','on',...
'CLimInclude','on',...
'ALimInclude','on',...
'Clipping','off');

appdata = [];
appdata.lastValidTag = 'frm1';

h8 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'Callback','%automatic',...
'ForegroundColor',[0.501960784313725 0.501960784313725 0.501960784313725],...
'Position',[0.0225563909774436 0.0418848167539267 0.304511278195489 0.921465968586388],...
'String','',...
'Style','frame',...
'Tag','frm1',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

appdata = [];
appdata.lastValidTag = 'list_Signal';

h9 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'BackgroundColor',[1 1 1],...
'Callback','TxTester_export(''list_Signal_Callback'',gcbo,[],guidata(gcbo))',...
'FontSize',9,...
'Position',[0.0394736842105263 0.183246073298429 0.270676691729323 0.74869109947644],...
'String','<empty>',...
'Style','listbox',...
'Value',1,...
'CreateFcn', {@local_CreateFcn, 'TxTester_export(''list_Signal_CreateFcn'',gcbo,[],guidata(gcbo))', appdata} ,...
'Tag','list_Signal',...
'Behavior',get(0,'defaultuicontrolBehavior'));

appdata = [];
appdata.lastValidTag = 'btn_Plot';

h10 = uicontrol(...
'Parent',h2,...

⌨️ 快捷键说明

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