function varargout = OFDM_test(varargin)
% OFDM_TEST MATLAB code for OFDM_test.fig
% OFDM_TEST, by itself, creates a new OFDM_TEST or raises the existing
% singleton*.
%
% H = OFDM_TEST returns the handle to a new OFDM_TEST or the handle to
% the existing singleton*.
%
% OFDM_TEST('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in OFDM_TEST.M with the given input arguments.
%
% OFDM_TEST('Property','Value',...) creates a new OFDM_TEST or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before OFDM_test_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to OFDM_test_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help OFDM_test
% Last Modified by GUIDE v2.5 22-Nov-2018 23:50:12
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @OFDM_test_OpeningFcn, ...
'gui_OutputFcn', @OFDM_test_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before OFDM_test is made visible.
function OFDM_test_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to OFDM_test (see VARARGIN)
% Choose default command line output for OFDM_test
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes OFDM_test wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = OFDM_test_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
set(handles.Path,'String',1);
set(handles.SNR,'String',20);
% --- Executes on button press in start.
function start_Callback(hObject, eventdata, handles)
str = get(handles.Modulation_type, 'String');
val = get(handles.Modulation_type,'Value');
switch str{val}
case 'QPSK'
modu_type = 0;
case '16QAM'
modu_type = 1;
end
SNR = str2double(get(handles.SNR,'String'));
if (isnan(SNR))
SNR = 20;
set(handles.SNR,'String',20);
end
pathes = str2double(get(handles.Path,'String'));
if (isnan(pathes))
pathes = 1;
set(handles.Path,'String',1);
end
OP = get(handles.OP_switch, 'Value');
config=OFDMSettings(modu_type, SNR, pathes, 1, 0, 0, OP,1024,8);
Baseband=OFDMSimpleSignalGenerator(config);
OFDM(config,Baseband);
function SNR_Callback(hObject, eventdata, handles)
guidata(hObject, handles);
% --- Executes during object creation, after setting all properties.
function SNR_CreateFcn(hObject, eventdata, handles)
% hObject handle to SNR (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
function Path_Callback(hObject, eventdata, handles)
guidata(hObject, handles);
% --- Executes during object creation, after setting all properties.
function Path_CreateFcn(hObject, eventdata, handles)
% hObject handle to Path (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 selection change in Modulation_type.
function Modulation_type_Callback(hObject, eventdata, handles)
guidata(hObject,handles)
% --- Executes during object creation, after setting all properties.
function Modulation_type_CreateFcn(hObject, eventdata, handles)
% hObject handle to Modulation_type (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu 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 during object creation, after setting all properties.
function axes1_CreateFcn(hObject, eventdata, handles)
% hObject handle to axes1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: place code in OpeningFcn to populate axes1
% --- Executes on button press in BER_curve.
function BER_curve_Callback(hObject, eventdata, handles)
str = get(handles.Modulation_type, 'String');
val = get(handles.Modulation_type,'Value');
comp = get(handles.Compare_switch,'Value');
L = str2double(get(handles.Path,'String'));
switch str{val}
case 'QPSK'
modu_type = 0;
case '16QAM'
modu_type = 1;
end
OFDM_BER_SNR(modu_type, L, comp);
% --- Executes on button press in BER_path.
function BER_path_Callback(hObject, eventdata, handles)
str = get(handles.Modulation_type, 'String');
val = get(handles.Modulation_type,'Value');
comp = get(handles.Compare_switch,'Value');
SNR = str2double(get(handles.SNR,'String'));
switch str{val}
case 'QPSK'
modu_type = 0;
case '16QAM'
modu_type = 1;
end
OFDM_BER_L(modu_type, SNR, comp);
% hObject handle to BER_path (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in OP_switch.
function OP_switch_Callback(hObject, eventdata, handles)
% hObject handle to OP_switch (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of OP_switch
% --- Executes on button press in Compare_switch.
function Compare_switch_Callback(hObject, eventdata, handles)
% hObject handle to Compare_switch (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of Compare_switch
% --- Executes when user attempts to close figure1.
function figure1_CloseRequestFcn(hObject, eventdata, handles)
% hObject handle to figure1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: delete(hObject) closes the figure
close(findobj(0,'Name','16QAM Constellation Diagram'));
close(findobj(0,'Nam
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
MATLAB(Matrix Laboratory)是一款由美国MathWorks公司开发的高性能商业数学软件,它集成了高级技术计算语言、交互式环境以及丰富的工具箱,被广泛应用于工程计算、数据分析、算法开发和科学可视化等领域。MATLAB的核心功能包括: 1. **数值计算**:支持大规模矩阵和数组运算,对线性代数、微积分、概率统计等数学问题提供高效解决方案。 2. **编程环境**:提供了易于使用的脚本编写与函数定义界面,支持面向对象编程,并可通过M文件实现模块化程序设计。 3. **数据可视化**:内置强大的二维和三维图形绘制功能,能够创建高质量的数据图表,便于数据分析和结果展示。 4. **工具箱扩展**:MathWorks为MATLAB提供了众多领域的专业工具箱,如信号处理、图像处理、通信系统、控制系统、机器学习、深度学习、量化金融、优化算法等,极大地扩展了MATLAB的应用范围。 5. **Simulink仿真**:作为MATLAB的重要组成部分,Simulink是一个动态系统建模、仿真和基于模型的设计环境,特别适用于多域物理系统和嵌入式系统的模拟和实时测试。 6. **集成能力**:MATLAB可以与其他编程语言(如C、C++、Java、Python等)及外部应用程序进行数据交换和联合开发,也可以调用硬件接口进行实时实验和控制。 7. **交互式工作空间**:用户可以在命令窗口中直接输入表达式并立即得到结果,这种交互式的特性使得快速原型设计和调试变得极为便利。 总之,MATLAB是科学家、工程师和技术人员进行科研、教育和工业应用不可或缺的强大工具之一,尤其在需要大量数值计算和复杂系统建模的场景下发挥着重要作用。
资源推荐
资源详情
资源评论
收起资源包目录
<2018-BUAA数字通信项目>基于Matlab的OFDM仿真.zip (22个子文件)
WGT1-code
.gitignore 31B
OFDM
OFDMTransferImage.m 833B
rcoswindow.m 362B
qam16.m 762B
demoduqpsk.m 684B
README.adoc 259B
OFDM_test.fig 17KB
OFDM_BER_SNR.m 2KB
OFDMSimpleSignalGenerator.m 124B
QPSK_Demodulation.m 570B
OFDMReceiver.m 3KB
OFDMChannel.m 1KB
OFDMSettings.m 1KB
OFDMTransiver.m 4KB
qpsk.m 532B
OFDM_BER_L.m 2KB
OFDM.m 1KB
demoduqam16.m 910B
QAM16_Demodulation.m 796B
OFDM_test.m 8KB
Go.jpg 32KB
Window.m 344B
共 22 条
- 1
资源评论
JJJ69
- 粉丝: 6352
- 资源: 5918
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- C语言-leetcode题解之83-remove-duplicates-from-sorted-list.c
- C语言-leetcode题解之79-word-search.c
- C语言-leetcode题解之78-subsets.c
- C语言-leetcode题解之75-sort-colors.c
- C语言-leetcode题解之74-search-a-2d-matrix.c
- C语言-leetcode题解之73-set-matrix-zeroes.c
- 树莓派物联网智能家居基础教程
- YOLOv5深度学习目标检测基础教程
- (源码)基于Arduino和Nextion的HMI人机界面系统.zip
- (源码)基于 JavaFX 和 MySQL 的影院管理系统.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功