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

📄 paramsetting.asv

📁 一个仿真测试4FSK信号的matlab环境GUI程序。可以查看基带IQ波形、眼图、星座图。并可以仿真高斯白噪声、瑞利衰减对信号的影响。
💻 ASV
📖 第 1 页 / 共 2 页
字号:
    'Style', 'text', ...
    'Units', 'normalized', ...
    'Position', [0.46 0.56 0.25 0.06], ...
    'String', 'M array :', ...
    'fontsize', hdl.Envi.fontSize, ...
    'backgroundColor', hdl.Envi.bckgrdColor+0.09, ...
    'HorizontalAlignment', 'right', 'Visible', 'off');

PShdl.modFdEdit = uicontrol(...
    'parent', PShdl.mainpanel, ...
    'Style', 'edit', ...
    'Units', 'normalized', ...
    'Position', [0.725 0.445 0.19 0.09], ...
    'String', '4800', ...
    'fontsize', hdl.Envi.fontSize, 'Visible', 'off');
PShdl.modFdLabel = uicontrol(...
    'Parent', PShdl.mainpanel, ...
    'Style', 'text', ...
    'Units', 'normalized', ...
    'Position', [0.46 0.46 0.25 0.06], ...
    'String', 'Fd (sym/sec) :', ...
    'fontsize', hdl.Envi.fontSize, ...
    'backgroundColor', hdl.Envi.bckgrdColor+0.09, ...
    'HorizontalAlignment', 'right', 'Visible', 'off');

PShdl.modindexEdit = uicontrol(...
    'parent', PShdl.mainpanel, ...
    'Style', 'edit', ...
    'Units', 'normalized', ...
    'Position', [0.725 0.353 0.19 0.09], ...
    'String', '0.27', ...
    'fontsize', hdl.Envi.fontSize, 'Visible', 'off');
PShdl.modindexLabel = uicontrol(...
    'Parent', PShdl.mainpanel, ...
    'Style', 'text', ...
    'Units', 'normalized', ...
    'Position', [0.46 0.36 0.25 0.06], ...
    'String', 'Deviation Index :', ...
    'fontsize', hdl.Envi.fontSize, ...
    'backgroundColor', hdl.Envi.bckgrdColor+0.09, ...
    'HorizontalAlignment', 'right', 'Visible', 'off');

% -----------------------------
%  Pluse Shape filter
% -----------------------------
PShdl.RRCPopUp = uicontrol(...
    'parent', PShdl.mainpanel, ...
    'Style', 'popupmenu', ...
    'Units', 'normalized', ...
    'Position', [0.725 0.88 0.19 0.06], ...
    'String', 'RRC', ...
    'fontsize', hdl.Envi.fontSize, ...
    'Visible', 'off');
PShdl.RRCLabel = uicontrol(...
    'Parent', PShdl.mainpanel, ...
    'Style', 'text', ...
    'Units', 'normalized', ...
    'Position', [0.46 0.86 0.25 0.06], ...
    'String', 'Filter Type :', ...
    'fontsize', hdl.Envi.fontSize, ...
    'backgroundColor', hdl.Envi.bckgrdColor+0.09, ...
    'HorizontalAlignment', 'right', 'Visible', 'off');
PShdl.RRCorder_Label = uicontrol(...
    'parent',PShdl.mainpanel, ...
    'Style', 'text', ...
    'Units', 'normalized', ...
    'Position', [0.46 0.76 0.25 0.06], ...
    'String', 'Filter Order :', ...
    'fontsize', hdl.Envi.fontSize, ...
    'backgroundColor', hdl.Envi.bckgrdColor+0.08, ...
    'HorizontalAlignment', 'right', 'Visible', 'off');
PShdl.RRCorder_Edit = uicontrol(...
    'parent',PShdl.mainpanel, ...
    'Style', 'edit', ...
    'Units', 'normalized', ...
    'Position', [0.725 0.745 0.19 0.085], ...
    'String', num2str(TxParamSet.RRC.order), ...
    'fontsize', hdl.Envi.fontSize, 'Visible', 'off');
PShdl.RRCcoef_Label = uicontrol(...
    'parent',PShdl.mainpanel, ...
    'Style', 'text', ...
    'Units', 'normalized', ...
    'Position', [0.45 0.66 0.45 0.06], ...
    'String', 'Filter Coefficient(Pasted here) :', ...
    'fontsize', hdl.Envi.fontSize, ...
    'backgroundColor', hdl.Envi.bckgrdColor+0.08, ...
    'HorizontalAlignment', 'left', 'Visible', 'off');
PShdl.RRCcoef_Edit = uicontrol(...
    'parent',PShdl.mainpanel, ...
    'Style', 'edit', ...
    'Units', 'normalized', 'HorizontalAlignment', 'left', ...
    'Position', [0.45 0.26 0.48 0.38], ...
    'String', num2str(TxParamSet.RRC.coef), 'Max', 2, 'Min', 0, ...
    'fontsize', hdl.Envi.fontSize, 'Visible', 'off');



% -----------------------------
%  Lowpass filter
% -----------------------------
PShdl.LPFPopUp = uicontrol(...
    'parent', PShdl.mainpanel, ...
    'Style', 'popupmenu', ...
    'Units', 'normalized', ...
    'Position', [0.725 0.88 0.19 0.06], ...
    'String', 'LPF(FIR)', ...
    'fontsize', hdl.Envi.fontSize, ...
    'Visible', 'off');
PShdl.LPFLabel = uicontrol(...
    'Parent', PShdl.mainpanel, ...
    'Style', 'text', ...
    'Units', 'normalized', ...
    'Position', [0.46 0.86 0.25 0.06], ...
    'String', 'Filter Type :', ...
    'fontsize', hdl.Envi.fontSize, ...
    'backgroundColor', hdl.Envi.bckgrdColor+0.09, ...
    'HorizontalAlignment', 'right', 'Visible', 'off');
PShdl.LPForder_Label = uicontrol(...
    'parent',PShdl.mainpanel, ...
    'Style', 'text', ...
    'Units', 'normalized', ...
    'Position', [0.46 0.76 0.25 0.06], ...
    'String', 'Filter Order :', ...
    'fontsize', hdl.Envi.fontSize, ...
    'backgroundColor', hdl.Envi.bckgrdColor+0.08, ...
    'HorizontalAlignment', 'right', 'Visible', 'off');
PShdl.LPForder_Edit = uicontrol(...
    'parent',PShdl.mainpanel, ...
    'Style', 'edit', ...
    'Units', 'normalized', ...
    'Position', [0.725 0.745 0.19 0.085], ...
    'String', '64', ...
    'fontsize', hdl.Envi.fontSize, 'Visible', 'off');
PShdl.LPFcoef_Label = uicontrol(...
    'parent',PShdl.mainpanel, ...
    'Style', 'text', ...
    'Units', 'normalized', ...
    'Position', [0.45 0.66 0.45 0.06], ...
    'String', 'Filter Coefficient(Pasted here) :', ...
    'fontsize', hdl.Envi.fontSize, ...
    'backgroundColor', hdl.Envi.bckgrdColor+0.08, ...
    'HorizontalAlignment', 'left', 'Visible', 'off');
PShdl.LPFcoef_Edit = uicontrol(...
    'parent',PShdl.mainpanel, ...
    'Style', 'edit', ...
    'Units', 'normalized', 'HorizontalAlignment', 'left', ...
    'Position', [0.45 0.26 0.48 0.38], ...
    'String', num2str(TxParamSet.LPF.coef), 'Max', 2, 'Min', 0, ...
    'fontsize', hdl.Envi.fontSize, 'Visible', 'off');

% -----------------------------
% Default / OK / Cancel  ...pushbuttom
% -----------------------------
left = 0.1;
right = 0.9;
top = 0.17;
bottom = 0.08;
frmBorder = 0.02;
frmPos = [left-frmBorder bottom-frmBorder (right-left)+2*frmBorder ...
    (top-bottom)+2*frmBorder];
uicontrol(...
    'Parent', PShdl.mainpanel, ...
    'Style', 'frame', ...
    'Units', 'normalized', ...
    'Position', frmPos, ...
    'backgroundcolor', [0.685 0.685 0.685], ...
    'foregroundcolor', [0 0 0]);

left = 0.15;
btnWidth = 0.2;
btnHeight =0.08;
btnPos = [left top-1.05*btnHeight btnWidth btnHeight];
PShdl.defaultbtn = uicontrol(...
    'Parent', PShdl.mainpanel, ...
    'Style', 'pushbutton', ...
    'Units', 'normalized', ...
    'Position', btnPos, ...
    'String', 'Default', ...
    'fontsize', hdl.Envi.fontSize);
left = 0.4;
btnPos = [left top-1.05*btnHeight btnWidth btnHeight];
PShdl.defaultbtn = uicontrol(...
    'Parent', PShdl.mainpanel, ...
    'Style', 'pushbutton', ...
    'Units', 'normalized', ...
    'Position', btnPos, ...
    'String', 'OK', ...
    'fontsize', hdl.Envi.fontSize);
left = 0.65;
btnPos = [left top-1.05*btnHeight btnWidth btnHeight];
PShdl.defaultbtn = uicontrol(...
    'Parent', PShdl.mainpanel, ...
    'Style', 'pushbutton', ...
    'Units', 'normalized', ...
    'Position', btnPos, ...
    'String', 'Cancel', ...
    'fontsize', hdl.Envi.fontSize, ...
    'callback', 'close');

set(ParamSetFig,'UserData',PShdl);

% =====================================================================
% callback function    listbox callback
% =====================================================================
function listbox_callback()
PShdl = get(gcf,'UserData');
hdls_Envi = [PShdl.slider, PShdl.panel1, PShdl.panel2, PShdl.panel3, ...
    PShdl.panel4, PShdl.panel5, PShdl.panel6, PShdl.panel7];
hdls_Mod = [PShdl.modMethodPopUp, PShdl.modMethodLabel, ...
            PShdl.modnSampEdit, PShdl.modnSampLabel, ...
            PShdl.modFreq_sepEdit, PShdl.modFreq_sepLabel, ...
            PShdl.modMEdit, PShdl.modMLabel, ...
            PShdl.modFdEdit, PShdl.modFdLabel, ...
            PShdl.modindexEdit, PShdl.modindexLabel];
hdls_Carry = [PShdl.carryfrqEdit, PShdl.carryfrqLabel, ...
    PShdl.carryPhaseEdit, PShdl.carryPhaseLabel, ...
    PShdl.FsEdit, PShdl.FsLabel, ...
    PShdl.FdEdit, PShdl.FdLabel];
hdls_LPF = [PShdl.LPFPopUp, PShdl.LPFLabel, PShdl.LPForder_Label, ...
    PShdl.LPForder_Edit, PShdl.LPFcoef_Label, PShdl.LPFcoef_Edit];
hdls_RRC = [PShdl.RRCPopUp, PShdl.RRCLabel, PShdl.RRCorder_Label, ...
    PShdl.RRCorder_Edit, PShdl.RRCcoef_Label, PShdl.RRCcoef_Edit];

switch get(PShdl.listbox,'Value')
    case 1
        invhandl = [PShdl.modMethodPopUp, PShdl.modMethodLabel, ...
            PShdl.modnSampEdit, PShdl.modnSampLabel, ...
            PShdl.modFreq_sepEdit, PShdl.modFreq_sepLabel, ...
            PShdl.modMEdit, PShdl.modMLabel, ...
            PShdl.modFdEdit, PShdl.modFdLabel, ...
            PShdl.modindexEdit, PShdl.modindexLabel];
        set(invhandl, 'Visible','off');
        vhandl = [PShdl.carryfrqEdit, PShdl.carryfrqLabel, ...
            PShdl.carryPhaseEdit, PShdl.carryPhaseLabel, ...
            PShdl.FsEdit, PShdl.FsLabel, ...
            PShdl.FdEdit, PShdl.FdLabel, ...
            PShdl.slider, PShdl.panel1, PShdl.panel2, PShdl.panel3, ...
            PShdl.panel4, PShdl.panel5, PShdl.panel6, PShdl.panel7];
        set(vhandl,'Visible','on');
    case 2
        invhandl = [PShdl.carryfrqEdit, PShdl.carryfrqLabel, ...
            PShdl.carryPhaseEdit, PShdl.carryPhaseLabel, ...
            PShdl.FsEdit, PShdl.FsLabel, ...
            PShdl.FdEdit, PShdl.FdLabel];
        set(invhandl, 'Visible','off');
        vhandl = [PShdl.modMethodPopUp, PShdl.modMethodLabel, ...
            PShdl.modnSampEdit, PShdl.modnSampLabel, ...
            PShdl.modFreq_sepEdit, PShdl.modFreq_sepLabel, ...
            PShdl.modMEdit, PShdl.modMLabel, ...
            PShdl.modFdEdit, PShdl.modFdLabel, ...
            PShdl.modindexEdit, PShdl.modindexLabel, ...
            PShdl.slider, PShdl.panel1, PShdl.panel2, PShdl.panel3, ...
            PShdl.panel4, PShdl.panel5, PShdl.panel6, PShdl.panel7];
        set(vhandl, 'Visible', 'on');
    case 3
        invhandl = [PShdl.carryfrqEdit, PShdl.carryfrqLabel, ...
            PShdl.carryPhaseEdit, PShdl.carryPhaseLabel, ...
            PShdl.FsEdit, PShdl.FsLabel, ...
            PShdl.FdEdit, PShdl.FdLabel, ...
            PShdl.modMethodPopUp, PShdl.modMethodLabel, ...
            PShdl.modnSampEdit, PShdl.modnSampLabel, ...
            PShdl.modFreq_sepEdit, PShdl.modFreq_sepLabel, ...
            PShdl.modMEdit, PShdl.modMLabel, ...
            PShdl.modFdEdit, PShdl.modFdLabel, ...
            PShdl.modindexEdit, PShdl.modindexLabel, ...
            PShdl.slider, PShdl.panel3, ...
            PShdl.panel4, PShdl.panel5, PShdl.panel6, PShdl.panel7];
        set(invhandl, 'Visible', 'off');
        vhandl = [PShdl.LPFPopUp, PShdl.LPFLabel, PShdl.LPForder_Label, ...
            PShdl.LPForder_Edit, PShdl.LPFcoef_Label, PShdl.LPFcoef_Edit];
        set(vhandl, 'Visible', 'on');
    case 4
        invhandl = [PShdl.carryfrqEdit, PShdl.carryfrqLabel, ...
            PShdl.carryPhaseEdit, PShdl.carryPhaseLabel, ...
            PShdl.FsEdit, PShdl.FsLabel, ...
            PShdl.FdEdit, PShdl.FdLabel, ...
            PShdl.modMethodPopUp, PShdl.modMethodLabel, ...
            PShdl.modnSampEdit, PShdl.modnSampLabel, ...
            PShdl.modFreq_sepEdit, PShdl.modFreq_sepLabel, ...
            PShdl.modMEdit, PShdl.modMLabel, ...
            PShdl.modFdEdit, PShdl.modFdLabel, ...
            PShdl.modindexEdit, PShdl.modindexLabel];
        set(invhandl, 'Visible', 'off');
        vhandl = [];
        set(vhandl, 'Visible', 'on');
end

⌨️ 快捷键说明

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