随机信号分析与处理实验报告.docx

上传人:b****8 文档编号:30396781 上传时间:2023-08-14 格式:DOCX 页数:26 大小:703.18KB
下载 相关 举报
随机信号分析与处理实验报告.docx_第1页
第1页 / 共26页
随机信号分析与处理实验报告.docx_第2页
第2页 / 共26页
随机信号分析与处理实验报告.docx_第3页
第3页 / 共26页
随机信号分析与处理实验报告.docx_第4页
第4页 / 共26页
随机信号分析与处理实验报告.docx_第5页
第5页 / 共26页
点击查看更多>>
下载资源
资源描述

随机信号分析与处理实验报告.docx

《随机信号分析与处理实验报告.docx》由会员分享,可在线阅读,更多相关《随机信号分析与处理实验报告.docx(26页珍藏版)》请在冰豆网上搜索。

随机信号分析与处理实验报告.docx

随机信号分析与处理实验报告

随机信号分析与处理实验

 

题目:

对音频信号的随机处理

班级:

0312412

姓名:

肖文洲

学号:

031241217

指导老师:

钱楷

时间:

2014年11月25日

实验目的:

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;

(14)、截取声音信号的频谱;

(15)、expcdf;

(16)、periodogram;

(17)、weibrnd;

(18)、rand;

(19)、自相关函数;

(20)、截取信号的均方值。

实验步骤:

1、打开MATLAB软件,然后输入guide创建一个GUI文件。

2、在已经创建好的GUI文件里面穿件所需要的.fig面板(以学号姓名格式命名)。

入下图所示:

图为已经创建好的.fig面板

3、右击“概率密度”,查看回调,然后点击“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.

%

%XIAOWENZHOU('Property','Value',...)createsanewXIAOWENZHOUorraisesthe

%existingsingleton*.Startingfromtheleft,propertyvaluepairsare

%appliedtotheGUIbeforexiaowenzhou_OpeningFunctiongetscalled.An

%unrecognizedpropertynameorinvalidvaluemakespropertyapplication

%stop.Allinputsarepassedtoxiaowenzhou_OpeningFcnviavarargin.

%

%*SeeGUIOptionsonGUIDE'sToolsmenu.Choose"GUIallowsonlyone

%instancetorun(singleton)".

%

%Seealso:

GUIDE,GUIDATA,GUIHANDLES

%Edittheabovetexttomodifytheresponsetohelpxiaowenzhou

%LastModifiedbyGUIDEv2.502-Dec-201423:

14:

41

%Begininitializationcode-DONOTEDIT

gui_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});

end

ifnargout

[varargout{1:

nargout}]=gui_mainfcn(gui_State,varargin{:

});

else

gui_mainfcn(gui_State,varargin{:

});

end

%Endinitializationcode-DONOTEDIT

%---Executesjustbeforexiaowenzhouismadevisible.

functionxiaowenzhou_OpeningFcn(hObject,eventdata,handles,varargin)

%Thisfunctionhasnooutputargs,seeOutputFcn.

%hObjecthandletofigure

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%varargincommandlineargumentstoxiaowenzhou(seeVARARGIN)

%Choosedefaultcommandlineoutputforxiaowenzhou

handles.output=hObject;

%Updatehandlesstructure

guidata(hObject,handles);

%UIWAITmakesxiaowenzhouwaitforuserresponse(seeUIRESUME)

%uiwait(handles.figure1);

%---Outputsfromthisfunctionarereturnedtothecommandline.

functionvarargout=xiaowenzhou_OutputFcn(hObject,eventdata,handles)

%varargoutcellarrayforreturningoutputargs(seeVARARGOUT);

%hObjecthandletofigure

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%Getdefaultcommandlineoutputfromhandlesstructure

varargout{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)

%---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.

functionpushbutton6_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

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%---Executesonbuttonpressinpushbutton8.

functionpushbutton8_Callback(hObject,eventdata,handles)

x=wavread('Íõ·Æ.wav');

x=0:

0.1:

5;

y=unifpdf(x,1,30);

plot(y);

%hObjecthandletopushbutton8(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%---Executesonbuttonpressinpushbutton9.

functionpushbutton9_Callback(hObject,eventdata,handles)

x=wavread('Íõ·Æ.wav');

x=0:

0.1:

5;

y=unifcdf(x,1,5);

plot(y);

%hObjecthandletopushbutton9(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%---Executesonbuttonpressinpushbutton10.

functionpushbutton10_Callback(hObject,eventdata,handles)

x=wavread('Íõ·Æ.wav');

x=0:

0.1:

3;

y=raylpdf(x,2);

plot(y);

%hObjecthandletopushbutton10(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%---Executesonbuttonpressinpushbutton11.

functionpushbutton11_Callback(hObject,eventdata,handles)

x=wavread('Íõ·Æ.wav');

x=0:

0.1:

3;

y=raylcdf(x,10);

plot(y);

%hObjecthandletopushbutton11(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%---Executesonbuttonpressinpushbutton12.

functionpushbutton12_Callback(hObject,eventdata,handles)

x=wavread('Íõ·Æ.wav');

x=0:

0.01:

5;

y=exppdf(x,1);

plot(y);

%hObjecthandletopushbutton12(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%---Executesonbuttonpressinpushbutton13.

functionpushbutton13_Callback(hObject,eventdata,handles)

x=wavread('Íõ·Æ.wav');

x=0:

0.01:

5;

y=expcdf(x,1);

plot(y);

%hObjecthandletopushbutton13(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%---Executesonbuttonpressinpushbutton14.

functionpushbutton14_Callback(hObject,eventdata,handles)

[y,Fs,bits]=wavread('Íõ·Æ.wav');

y1=y(1:

1000);

t=0:

1/Fs:

1;

y1=periodogram(y1,[],1000,Fs);

plot(y1);

%hObjecthandletopushbutton14(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%---Executesonbuttonpressinpushbutton15.

functionpushbutton15_Callback(hObject,eventdata,handles)

x=wavread('Íõ·Æ.wav');

x=0:

0.01:

5;

x=weibrnd(1,1.5,100,1);

plot(x);

%hObjecthandletopushbutton15(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%---Executesonbuttonpressinpushbutton16.

functionpushbutton16_Callback(hObject,eventdata,handles)

x=wavread('Íõ·Æ.wav');

x=rand(200,1);

plot(x);

%hObjecthandletopushbutton16(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%---Executesonbuttonpressinpushbutton17.

functionpushbutton17_Callback(hObject,eventdata,handles)

[x,Fs,bits]=wavread('Íõ·Æ.wav');

x=x(:

1);

X=fft(x,4096);

magX=abs(X);

angX=angle(X);

plot(X);title('ÔʼÐźÅƵÆ×');

%hObjecthandletopushbutton17(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%---Executesonbuttonpressinpushbutton18.

functionpushbutton18_Callback(hObject,eventdata,handles)

[y,Fs,bits]=wavread('Íõ·Æ.wav');

y=y(500:

1000);

h=[ones(1,20)zeros(1,20)];

y2=conv(h,y);

stem(y2,'.');

grid;

title('

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 自然科学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1