北京理工大学 数字信号处理 实验报告 程序
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
数字信号处理实验报告
1.深入掌握应用DFT分析信号的频谱的理论方法,针对该问题进行一次全面综合
练习,完成一个完整的信号分析软件实现方法和流程,这种全面完整的综合练习可以帮助学生深入理解和消化基本理论,锻炼学生独立解决问题的能力,培养学生的创新意识,为今后的科研和工作打下良好的实践基础。
2.综合利用数字信号处理的理论知识完成数字滤波器的设计与实现,完成一个完
整的数字滤波器设计软件的实现方法和流程。这种全面完整的综合练习可以帮助学生深入理解和消化基本理论,锻炼学生独立解决问题的能力,培养学生的创新意识,为今后的科研和工作打下良好的实践基础。
二、实验设备与环境
计算机、MATLAB软件环境
三、实验内容
1.基于Matlab GUI的离散傅里叶变换分析
2.基于Matlab GUI的数字滤波器分析设计
1.基于Matlab GUI的离散傅里叶变换分析
信号: t=1:100;
x=2*sin(t/25*2*pi)+5*sin(t/5*2*pi);
说明:输入信号从Matlab Command Windows中生成,通过变量名导入本软件,并可输出DFT变换后的结果,默认名为DFT_输入变量名。
2.基于Matlab GUI的数字滤波器分析设计
IIR 低通:(巴特沃兹)
IIR高通:(切比雪夫I)
IIR带通:(切比雪夫II)
IIR带阻:(椭圆滤波器)
FIR低通:(矩形窗)
FIR高通:(汉宁窗)
FIR带通:(布莱克曼窗)
FIR带阻:(凯瑟窗)
五、程序界面设计及程序源代码
1.基于Matlab GUI的离散傅里叶变换分析
界面设计:
程序代码:
function varargout =
SignalDFTSoftware(varargin)
% SIGNALDFTSOFTWARE MATLAB code for SignalDFTSoftware.fig
% SIGNALDFTSOFTWARE, by itself, creates a new SIGNALDFTSOFTWARE or raises the existing
% singleton*.
%% H = SIGNALDFTSOFTWARE returns the handle to a new SIGNALDFTSOFTWARE or the handle to
% the existing singleton*.
%%
SIGNALDFTSOFTWARE('CALLBACK',hObject,even tData,handles,...) calls the local
% function named CALLBACK in SIGNALDFTSOFTWARE.M with the given input arguments.
%%
SIGNALDFTSOFTWARE('Property','Value',...) creates a new SIGNALDFTSOFTWARE or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before SignalDFTSoftware_OpeningFcn gets called.
An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to SignalDFTSoftware_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 SignalDFTSoftware
% Last Modified by GUIDE v2.5 26-Nov-2011 12:55:11
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',
mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn',
@SignalDFTSoftware_OpeningFcn, ...
'gui_OutputFcn',
@SignalDFTSoftware_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 SignalDFTSoftware is made visible.
function SignalDFTSoftware_OpeningFcn(hObjec t, 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
% varargin command line arguments to SignalDFTSoftware (see VARARGIN)
% Choose default command line output for SignalDFTSoftware
handles.output = hObject;
% Update handles structure guidata(hObject, handles);
% UIWAIT makes SignalDFTSoftware wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout =
SignalDFTSoftware_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
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- If Enable == 'on', executes on mouse press in 5 pixel border.
% --- Otherwise, executes on mouse press in 5 pixel border or over random.
function random_ButtonDownFcn(hObject, eventdata, handles)
% hObject handle to random (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% --- Executes on button press in random. function random_Callback(hObject, eventdata, handles)
% hObject handle to random (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
global x;
global x_flag;
x=rand(1,50)*20-10;
x_flag=1;
if(x_flag)
plot(handles.TD,0:(length(x)-1),x);
end
% --- Executes on button press in Delete.