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

📄 dsimsoft_export.m

📁 一个仿真测试4FSK信号的matlab环境GUI程序。可以查看基带IQ波形、眼图、星座图。并可以仿真高斯白噪声、瑞利衰减对信号的影响。
💻 M
📖 第 1 页 / 共 5 页
字号:
       
    %    strxLabel = 'In-Phase Signal';
    %    stryLabel = 'Quadrature-Phase Signal';
    %    plot(real(data(FromVal:ToVal)), imag(data(FromVal:ToVal)), color)
    %    SetAxes(handles, strTitle,strxLabel,stryLabel);
    %    return
        
    case {handles.AxesTitle_Plot3_IQTxPhaseMod, ...
            handles.AxesTitle_Plot3_IQTxPhaseFilter, ...
            handles.AxesTitle_Plot3_IQTxPhaseNoise, ...
            handles.AxesTitle_Plot3_IQTxPhaseFade, ...
            handles.AxesTitle_Plot3_IQRxPhaseFilter},
        if strcmp(strTitle, handles.AxesTitle_Plot3_IQTxPhaseMod)
            data = handles.data.y;
            t = [0:length(handles.data.y)-1]'/(mod.Fd*mod.nSamp);
            color = 'g-';
        end
        if strcmp(strTitle, handles.AxesTitle_Plot3_IQTxPhaseFilter)
            data = handles.data.yTx;
            t = [0:length(handles.data.yTx)-1]'/...
                (mod.Fd*mod.nSamp*rrc.OverSamp);
            color = 'm-';
        end
        if strcmp(strTitle, handles.AxesTitle_Plot3_IQTxPhaseNoise)
            data = handles.data.yNoise;
            t = [0:length(handles.data.yNoise)-1]'/...
            (mod.Fd*mod.nSamp*rrc.OverSamp);
            color = 'c-';
        end
        if strcmp(strTitle, handles.AxesTitle_Plot3_IQTxPhaseFade)
            data = handles.data.yFading;
            t = [0:length(handles.data.yFading)-1]'/...
            (mod.Fd*mod.nSamp*rrc.OverSamp);
            color = 'y-';
        end
        if strcmp(strTitle, handles.AxesTitle_Plot3_IQRxPhaseFilter)
            data = handles.data.yDown;
            t = [0:length(handles.data.yDown)-1]'/(mod.Fd*mod.nSamp);
            color = 'g-';
        end
        
        plot3(real(data(FromVal:ToVal)), imag(data(FromVal:ToVal)), ...
            t(FromVal:ToVal), color);
        strxLabel = 'Real part';
        stryLabel = 'Image part';
        strzLabel = 'Time (s)';
        SetAxes(handles, strTitle, strxLabel, stryLabel, strzLabel);
        return
        
    case {handles.AxesTitle_Polar_IQTxPhaseMod, ...
            handles.AxesTitle_Polar_IQTxPhaseFilter, ...
            handles.AxesTitle_Polar_IQTxPhaseNoise, ...
            handles.AxesTitle_Polar_IQTxPhaseFade, ...
            handles.AxesTitle_Polar_IQRxPhaseFilter},
        if strcmp(strTitle, handles.AxesTitle_Polar_IQTxPhaseMod)
            data = handles.data.y;
            color = 'g-';
        end
        if strcmp(strTitle, handles.AxesTitle_Polar_IQTxPhaseFilter)
            data = handles.data.yTx;
            color = 'm-';
        end
        if strcmp(strTitle, handles.AxesTitle_Polar_IQTxPhaseNoise)
            data = handles.data.yNoise;
            color = 'c-';
        end
        if strcmp(strTitle, handles.AxesTitle_Polar_IQTxPhaseFade)
            data = handles.data.yFading;
            color = 'y-';
        end
        if strcmp(strTitle, handles.AxesTitle_Polar_IQRxPhaseFilter)
            data = handles.data.yDown;
            color = 'g-';
        end
        
        polar(unwrap(angle(data(FromVal:ToVal))), ...
            abs(data(FromVal:ToVal)), color);
        strxLabel = 'Angle (radian)';
        stryLabel = 'Radius';
        SetAxes(handles, strTitle, strxLabel, stryLabel);
        return
      
    otherwise
        return
end
set(handles.axes_main, 'XLim', [FromVal-1 ToVal-1]*Ts);


% --- Creates and returns a handle to the GUI figure. 
function h1 = DSimSoft_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, ...
    'text', 20, ...
    'listbox', 5, ...
    'uipanel', 15, ...
    'axes', 2, ...
    'pushbutton', 21, ...
    'radiobutton', 12, ...
    'checkbox', 6, ...
    'frame', 10, ...
    'edit', 2, ...
    'slider', 3, ...
    'popupmenu', 2), ...
    'override', 0, ...
    'release', 13, ...
    'resize', 'none', ...
    'accessibility', 'callback', ...
    'mfile', 1, ...
    'callbacks', 1, ...
    'singleton', 1, ...
    'syscolorfig', 1, ...
    'blocking', 0, ...
    'lastSavedFile', 'E:\MATLAB701\work\DSimSoft\DSimSoft_export.m');
appdata.lastValidTag = 'DSimSoft';
appdata.GUIDELayoutEditor = [];

h1 = figure(...
'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','DSimSoft',...
'NumberTitle','off',...
'PaperPosition',get(0,'defaultfigurePaperPosition'),...
'PaperSize',[20.98404194812 29.67743169791],...
'PaperType',get(0,'defaultfigurePaperType'),...
'Position',[150 100 780 550],...
'Renderer','zbuffer',...
'RendererMode','manual',...
'ToolBar','figure',...
'HandleVisibility','callback',...
'Tag','DSimSoft',...
'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.178181818181818 0.24 0.82],...
'Tag','uipanel1',...
'Behavior',get(0,'defaultuipanelBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h3 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'Callback','%automatic',...
'ForegroundColor',[0.501960784313725 0.501960784313725 0.501960784313725],...
'Position',[0.513513513513514 0.02 0.437837837837838 0.18],...
'String',{  'Push Button' },...
'Style','frame',...
'Tag','frame3',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h4 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'Callback','%automatic',...
'ForegroundColor',[0.501960784313725 0.501960784313725 0.501960784313725],...
'Position',[0.0526315789473684 0.764444444444444 0.9 0.211111111111111],...
'String',{  'Push Button' },...
'Style','frame',...
'Tag','pushbutton1',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h5 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'Position',[0.1 0.955555555555556 0.22 0.0355555555555556],...
'String','Choice',...
'Style','text',...
'Tag','text2',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h6 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'Callback','DSimSoft_export(''radiobtn_Sim_Callback'',gcbo,[],guidata(gcbo))',...
'Position',[0.1 0.92 0.5 0.0355555555555556],...
'String','for Simulation',...
'Style','radiobutton',...
'Value',1,...
'Tag','radiobtn_Sim',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h7 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'Callback','DSimSoft_export(''radiobtn_Test_Callback'',gcbo,[],guidata(gcbo))',...
'Position',[0.1 0.833333333333333 0.8 0.0355555555555556],...
'String','for Test(FPGA/DSP)',...
'Style','radiobutton',...
'Tag','radiobtn_Test',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h8 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'Callback','DSimSoft_export(''chkb_Sim_Tx_Callback'',gcbo,[],guidata(gcbo))',...
'Position',[0.167567567567568 0.877777777777778 0.4 0.0355555555555556],...
'String','Transmitter',...
'Style','checkbox',...
'Value',1,...
'Tag','chkb_Sim_Tx',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h9 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'Callback','DSimSoft_export(''chkb_Sim_Rx_Callback'',gcbo,[],guidata(gcbo))',...
'Position',[0.578378378378378 0.875555555555556 0.356756756756757 0.0355555555555556],...
'String','Receiver',...
'Style','checkbox',...
'Value',1,...
'Tag','chkb_Sim_Rx',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h10 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'Callback','DSimSoft_export(''chkb_Test_Tx_Callback'',gcbo,[],guidata(gcbo))',...
'Enable','off',...
'Position',[0.168 0.786666666666667 0.4 0.0355555555555556],...
'String','Transmitter',...
'Style','radiobutton',...
'Tag','chkb_Test_Tx',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h11 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'Callback','DSimSoft_export(''chkb_Test_Rx_Callback'',gcbo,[],guidata(gcbo))',...
'Enable','off',...
'Position',[0.578378378378378 0.786666666666667 0.356756756756757 0.0355555555555556],...
'String','Receiver',...
'Style','radiobutton',...
'Tag','chkb_Test_Rx',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h12 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'Callback','%automatic',...
'ForegroundColor',[0.501960784313725 0.501960784313725 0.501960784313725],...
'Position',[0.0526315789473684 0.368888888888889 0.9 0.371111111111111],...
'String',{  'Push Button' },...
'Style','frame',...
'Tag','frame1',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h13 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'Position',[0.102702702702703 0.72 0.372972972972973 0.0355555555555556],...
'String','Param Setting',...
'Style','text',...
'Tag','text3',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h14 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'BackgroundColor',[0.807843137254902 0.807843137254902 0.807843137254902],...
'Callback','DSimSoft_export(''list_ParamSet_Callback'',gcbo,[],guidata(gcbo))',...
'Position',[0.136842105263158 0.422222222222222 0.731578947368421 0.291111111111111],...
'String',{  '      Signal Source'; '   ------------------------'; '         Modulation'; '   ------------------------'; '  Pluse Shape(RRC)'; '   ------------------------'; '  Gauss Wihte Noise'; '     Rayleigh Fading' },...
'Style','listbox',...
'Value',1,...
'Tag','list_ParamSet',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h15 = uicontrol(...
'Parent',h2,...
'Units','normalized',...
'ForegroundColor',[0.501960784313725 0.501960784313725 0.501960784313725],...
'Position',[0.152631578947368 0.377777777777778 0.652631578947368 0.0355555555555556],...
'String','Double Click for Setting',...
'Style','text',...
'Tag','text4',...
'Behavior',get(0,'defaultuicontrolBehavior'),...
'CreateFcn', {@local_CreateFcn, '', appdata} );

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

h16 = uicontrol(.

⌨️ 快捷键说明

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