您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > 随机信号分析与处理实验报告
1随机信号分析与处理实验题目:对音频信号的随机处理班级:0312412姓名:肖文洲学号:031241217指导老师:钱楷时间:2014年11月25日2实验目的:1、学会利用MATLAB模拟产生各类随机序列。2、熟悉和掌握随机信号数字特征估计的基本方法。3、熟悉掌握MATLAB的函数及函数调用、使用方法。4、学会在MATLAB中创建GUI文件。实验内容:1、选用任意一个音频信号作为实验对象,进行各种操作并画出信号和波形。2、操作类型:(1)、概率密度;(2)、希尔伯特变换;(3)、误差函数;(4)、randn;(5)、原始信号频谱;(6)、axis;(7)、原始信号;(8)、normpdf;(9)、unifpdf;(10)、unifcdf;(11)、raylpdf;(12)、raylcdf;(13)、exppdf;3(14)、截取声音信号的频谱;(15)、expcdf;(16)、periodogram;(17)、weibrnd;(18)、rand;(19)、自相关函数;(20)、截取信号的均方值。实验步骤:1、打开MATLAB软件,然后输入guide创建一个GUI文件。2、在已经创建好的GUI文件里面穿件所需要的.fig面板(以学号姓名格式命名)。入下图所示:图为已经创建好的.fig面板43、右击“概率密度”,查看回调,然后点击“callback”.在相应的位置输入程序。然后点击运行,出现下图:4、依次对后续操作方式进行类似的操作。5、当完成所有按键的“callback”后,出现的均为上图。实验程序:functionvarargout=xiaowenzhou(varargin)%XIAOWENZHOUM-fileforxiaowenzhou.fig%XIAOWENZHOU,byitself,createsanewXIAOWENZHOUorraisestheexisting%singleton*.%%H=XIAOWENZHOUreturnsthehandletoanewXIAOWENZHOUorthehandleto%theexistingsingleton*.%%XIAOWENZHOU('CALLBACK',hObject,eventData,handles,...)callsthelocal%functionnamedCALLBACKinXIAOWENZHOU.Mwiththegiveninputarguments.5%%XIAOWENZHOU('Property','Value',...)createsanewXIAOWENZHOUorraisesthe%existingsingleton*.Startingfromtheleft,propertyvaluepairsare%appliedtotheGUIbeforexiaowenzhou_OpeningFunctiongetscalled.An%unrecognizedpropertynameorinvalidvaluemakespropertyapplication%stop.Allinputsarepassedtoxiaowenzhou_OpeningFcnviavarargin.%%*SeeGUIOptionsonGUIDE'sToolsmenu.ChooseGUIallowsonlyone%instancetorun(singleton).%%Seealso:GUIDE,GUIDATA,GUIHANDLES%Edittheabovetexttomodifytheresponsetohelpxiaowenzhou%LastModifiedbyGUIDEv2.502-Dec-201423:14:41%Begininitializationcode-DONOTEDITgui_Singleton=1;gui_State=struct('gui_Name',mfilename,...'gui_Singleton',gui_Singleton,...'gui_OpeningFcn',@xiaowenzhou_OpeningFcn,...'gui_OutputFcn',@xiaowenzhou_OutputFcn,...'gui_LayoutFcn',[],...'gui_Callback',[]);ifnargin&&ischar(varargin{1})gui_State.gui_Callback=str2func(varargin{1});endifnargout[varargout{1:nargout}]=gui_mainfcn(gui_State,varargin{:});elsegui_mainfcn(gui_State,varargin{:});end%Endinitializationcode-DONOTEDIT%---Executesjustbeforexiaowenzhouismadevisible.functionxiaowenzhou_OpeningFcn(hObject,eventdata,handles,varargin)6%Thisfunctionhasnooutputargs,seeOutputFcn.%hObjecthandletofigure%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%varargincommandlineargumentstoxiaowenzhou(seeVARARGIN)%Choosedefaultcommandlineoutputforxiaowenzhouhandles.output=hObject;%Updatehandlesstructureguidata(hObject,handles);%UIWAITmakesxiaowenzhouwaitforuserresponse(seeUIRESUME)%uiwait(handles.figure1);%---Outputsfromthisfunctionarereturnedtothecommandline.functionvarargout=xiaowenzhou_OutputFcn(hObject,eventdata,handles)%varargoutcellarrayforreturningoutputargs(seeVARARGOUT);%hObjecthandletofigure%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Getdefaultcommandlineoutputfromhandlesstructurevarargout{1}=handles.output;%---Executesonbuttonpressinpushbutton1.functionpushbutton1_Callback(hObject,eventdata,handles)[y,Fs,bits]=wavread('Íõ·Æ.wav');y=y(1:5000);N=length(y);i=1:N;[f,i]=ksdensity(y);plot(i,f);grid;xlabel('x');ylabel('f(x)');axis();title('¸ÅÂÊÃܶÈ');%hObjecthandletopushbutton1(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)7%---Executesonbuttonpressinpushbutton2.functionpushbutton2_Callback(hObject,eventdata,handles)x=wavread('Íõ·Æ.wav');x=x(20000:40000);y=hilbert(x);y=real(y);plot(x);%hObjecthandletopushbutton2(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%---Executesonbuttonpressinpushbutton3.functionpushbutton3_Callback(hObject,eventdata,handles)x=wavread('Íõ·Æ.wav');x=randn(500,1);plot(x);%hObjecthandletopushbutton3(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%---Executesonbuttonpressinpushbutton4.functionpushbutton4_Callback(hObject,eventdata,handles)x=wavread('Íõ·Æ.wav');y=erf(x);plot(y);%hObjecthandletopushbutton4(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%---Executesonbuttonpressinpushbutton5.functionpushbutton5_Callback(hObject,eventdata,handles)x=wavread('Íõ·Æ.wav');plot(x);axis([05000-0.010.01]);%hObjecthandletopushbutton5(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%---Executesonbuttonpressinpushbutton6.8functionpushbutton6_Callback(hObject,eventdata,handles)x=wavread('Íõ·Æ.wav');x=x(20000:40000);plot(x);%hObjecthandletopushbutton6(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%---Executesonbuttonpressinpushbutton7.functionpushbutton7_Callback(hObject,eventdata,handles)x=wavread('Íõ·Æ.wav');x=-6:0.01:7;y=normpdf(x,1,2);plot(y);%hObjecthandletopushbutton7(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%han
本文标题:随机信号分析与处理实验报告
链接地址:https://www.777doc.com/doc-3383649 .html