matlab項(xiàng)目總結(jié)報(bào)告.doc_第1頁
matlab項(xiàng)目總結(jié)報(bào)告.doc_第2頁
matlab項(xiàng)目總結(jié)報(bào)告.doc_第3頁
matlab項(xiàng)目總結(jié)報(bào)告.doc_第4頁
matlab項(xiàng)目總結(jié)報(bào)告.doc_第5頁
已閱讀5頁,還剩41頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

中國(guó)民航大學(xué)電子信息工程學(xué)院MATLAB聲音和圖像信號(hào)分析處理課程設(shè)計(jì)報(bào)告題 目:matlab信號(hào)采集、分析、處理實(shí)驗(yàn)專業(yè)班級(jí): 101045A 姓名:李雄洲 李文君 李陽 雷明超指導(dǎo)教師: 韓萍 何煒琨 二一二 年六月十五日 目 錄一、設(shè)計(jì)目的二、設(shè)計(jì)要求三、設(shè)計(jì)原理及方案四、硬件電路或軟件流程五、調(diào)試分析六、設(shè)計(jì)總結(jié)七、參考文獻(xiàn)八、附錄(程序代碼及元件清單)一、 設(shè)計(jì)目的課題目的在于通過matlab仿真實(shí)驗(yàn),熟悉matlab的操作環(huán)境,深刻體會(huì)信號(hào)處理的研究方法,使所學(xué)知識(shí)融會(huì)貫通,最大程度鍛煉工程項(xiàng)目能力。二、設(shè)計(jì)要求聲音部分:本次課程設(shè)計(jì)的目的是利用MATLAB對(duì)語音信號(hào)進(jìn)行數(shù)字信號(hào)處理和分析,要求學(xué)生采集語音信號(hào)后,在MATLAB軟件平臺(tái)進(jìn)行頻譜分析;并對(duì)所采集的語音信號(hào)加入干擾噪聲,對(duì)加入噪聲的信號(hào)進(jìn)行頻譜分析,設(shè)計(jì)合適的濾波器濾除噪聲,恢復(fù)原信號(hào)。要求利用MATLAB來讀入(采集)語音信號(hào),將它賦值給某一向量。再將該向量看作一個(gè)普通的信號(hào),對(duì)其進(jìn)行FFT變換實(shí)現(xiàn)頻譜分析,再依據(jù)實(shí)際情況對(duì)它進(jìn)行濾波。然后我們還可以通過sound命令來對(duì)語音信號(hào)進(jìn)行回放,以便在聽覺上來感受聲音的變化。圖形部分:搭建一個(gè)簡(jiǎn)單界面,實(shí)現(xiàn)信號(hào)(圖像)的加載并顯示,對(duì)采集信號(hào)進(jìn)行加噪,并對(duì)加噪前后信號(hào)進(jìn)行譜分析,將信號(hào)分析部分加載到所做界面中將濾波器設(shè)計(jì)部分加載到所做界面中,信號(hào)特技效果實(shí)現(xiàn)。三、設(shè)計(jì)原理與方案1、設(shè)計(jì)原理MATLAB是矩陣實(shí)驗(yàn)室(Matrix Laboratory)的簡(jiǎn)稱,是美國(guó)MathWorks公司出品的商業(yè)數(shù)學(xué)軟件,用于算法開發(fā)、數(shù)據(jù)可視化、數(shù)據(jù)分析以及數(shù)值計(jì)算的高級(jí)技術(shù)計(jì)算語言和交互式環(huán)境。通過MATLAB里幾個(gè)命令函數(shù)的調(diào)用,很輕易的在實(shí)際語音與數(shù)字信號(hào)的理論之間搭了一座橋。課題的特色在于它將語音信號(hào)看作一個(gè)向量,于是就把語音數(shù)字化了。那么,就可以完全利用數(shù)字信號(hào)處理的知識(shí)來解決語音及加噪處理問題。我們可以像給一般信號(hào)做頻譜分析一樣,來對(duì)語音信號(hào)做頻譜分析,也可以較容易的用數(shù)字濾波器來對(duì)語音進(jìn)行濾波處理。FIR濾波器結(jié)構(gòu)上主要是非遞歸結(jié)構(gòu),沒有輸出到輸入的反饋,系統(tǒng)函數(shù)H (z)在處收斂,極點(diǎn)全部在z = 0處(因果系統(tǒng)),因而只能用較高的階數(shù)達(dá)到高的選擇性。FIR數(shù)字濾波器的幅頻特性精度較之于IIR數(shù)字濾波器低,但是線性相位,就是不同頻率分量的信號(hào)經(jīng)過fir濾波器后他們的時(shí)間差不變,這是很好的性質(zhì)。FIR數(shù)字濾波器是有限的單位響應(yīng)也有利于對(duì)數(shù)字信號(hào)的處理,便于編程,用于計(jì)算的時(shí)延也小,這對(duì)實(shí)時(shí)的信號(hào)處理很重要。 FIR濾波器因具有系統(tǒng)穩(wěn)定,易實(shí)現(xiàn)相位控制,允許設(shè)計(jì)多通帶(或多阻帶)濾波器等優(yōu)點(diǎn)收到人們的青睞。IIR濾波器采用遞歸型結(jié)構(gòu),即結(jié)構(gòu)上帶有反饋環(huán)路。IIR濾波器運(yùn)算結(jié)構(gòu)通常由延時(shí)、乘以系數(shù)和相加等基本運(yùn)算組成,可以組合成直接型、正準(zhǔn)型、級(jí)聯(lián)型、并聯(lián)型四種結(jié)構(gòu)形式,都具有反饋回路。同時(shí),IIR數(shù)字濾波器在設(shè)計(jì)上可以借助成熟的模擬濾波器的成果,如巴特沃斯、契比雪夫和橢圓濾波器等,有現(xiàn)成的設(shè)計(jì)數(shù)據(jù)或圖表可查,在設(shè)計(jì)一個(gè)IIR數(shù)字濾波器時(shí),我們根據(jù)指標(biāo)先寫出模擬濾波器的公式,然后通過一定的變換,將模擬濾波器的公式轉(zhuǎn)換成數(shù)字濾波器的公式。在matlab中,一幅圖片可以定義為一個(gè)二維函數(shù)f(x, y),其中x和y表示空間坐標(biāo),而f對(duì)于任何一對(duì)(x, y)坐標(biāo)的函數(shù)值稱為該點(diǎn)處圖像的亮度或灰度。當(dāng)x, y和f的值都是有限的、離散的數(shù)值時(shí),稱該圖像為數(shù)字圖像。 圖像編碼壓縮技術(shù)可減少描述圖像的數(shù)據(jù)量(即比特?cái)?shù)),以便節(jié)省圖像傳輸、處理時(shí)間和減少所占用的存儲(chǔ)器容量。壓縮可以在不失真的前提下獲得,也可以在允許的失真條件下進(jìn)行。編碼是壓縮技術(shù)中最重要的方法,它在圖像處理技術(shù)中是發(fā)展最早且比較成熟的技術(shù)。 圖像增強(qiáng)和復(fù)原的目的是為了提高圖像的質(zhì)量,如去除噪聲,提高圖像的清晰度等。圖像增強(qiáng)不考慮圖像降質(zhì)的原因,突出圖像中所感興趣的部分。如強(qiáng)化圖像高頻分量,可使圖像中物體輪廓清晰,細(xì)節(jié)明顯;如強(qiáng)化低頻分量可減少圖像中噪聲影響。圖像復(fù)原要求對(duì)圖像降質(zhì)的原因有一定的了解,一般講應(yīng)根據(jù)降質(zhì)過程建立“降質(zhì)模型”,再采用某種濾波方法,恢復(fù)或重建原來的圖像。 2、設(shè)計(jì)方案MATLAB軟件熟悉與運(yùn)用。信號(hào)處理原理分析與處理方法討論。使用matlab中的 GUI 進(jìn)行搭建仿真測(cè)試與調(diào)試。四、軟件流程五、調(diào)試分析項(xiàng)目最開始的問題的是給GUI加一張背景圖片,起初的想法是在界面上放一個(gè)坐標(biāo),結(jié)果很不理想,后來發(fā)現(xiàn)本來GUI的界面就是一個(gè)坐標(biāo),我們只要設(shè)置好就行,因而就有了很經(jīng)典的那段程序:ha=axes(units,normalized,position,0 0 1 1);uistack(ha,down)II=imread(cauc.bmp);image(II)colormap grayset(ha,handlevisibility,off ,visible,off );這里面有個(gè)很有趣的東西,我們可以設(shè)置圖片為最底層,只要把down改成button就好程序在畫圖時(shí),在GUI上放了一些坐標(biāo)軸,但是設(shè)計(jì)得比較難看,因而使用程序?yàn)槠湓O(shè)置位置與大小:h=subplot(1,1,1);set(h,position,0.1 0.1 0.8 0.7);起到了很好的效果。做回聲那塊兒東西的時(shí)候,一直無法取到很好的效果,回聲效果一直不是很理想,最后試了好多次:global x;N=length(x);x1=x(1:N);x2=x(1:N);x1=x1,zeros(1,3000);x2=zeros(1,1500),0.4*x2,zeros(1,1500);y=x1+x2;終于發(fā)現(xiàn),分成1500和1500等長(zhǎng)的兩段之后,發(fā)現(xiàn)效果還是不錯(cuò)的,不知道是不是最好,但是已經(jīng)很不錯(cuò)了。六、設(shè)計(jì)總結(jié)通過此次項(xiàng)目,我們不僅把知識(shí)融會(huì)貫通,而且豐富了大腦,同時(shí)在查找資料的過程中也了解了許多課外知識(shí),開拓了視野,認(rèn)識(shí)了自己將來的發(fā)展方向,使自己在專業(yè)知識(shí)方面和動(dòng)手能力方面有了質(zhì)的飛躍。信號(hào)處理項(xiàng)目是對(duì)學(xué)校所學(xué)知識(shí)的全面總結(jié)和綜合應(yīng)用,又為今后走向社會(huì)的實(shí)際操作應(yīng)用鑄就了一個(gè)良好開端,對(duì)我們所學(xué)知識(shí)理論的檢驗(yàn)與總結(jié),能夠培養(yǎng)和提高設(shè)計(jì)者獨(dú)立分析和解決問題的能力;其次,項(xiàng)目指導(dǎo)是老師檢驗(yàn)其教學(xué)效果,改進(jìn)教學(xué)方法,提高教學(xué)質(zhì)量的絕好機(jī)會(huì)。在沒有做信號(hào)處理項(xiàng)目以前覺得信號(hào)處理項(xiàng)目只是對(duì)這一年來所學(xué)知識(shí)的大概總結(jié),但是真的面對(duì)信號(hào)處理項(xiàng)目發(fā)現(xiàn)自己的想法基本是錯(cuò)誤的。信號(hào)處理項(xiàng)目不僅是對(duì)前面所學(xué)知識(shí)的一種檢驗(yàn),而且也是對(duì)自己能力的一種提高。通過這次信號(hào)處理項(xiàng)目使我們明白了自己原來知識(shí)太理論化了,面對(duì)單獨(dú)的課題的是感覺很茫然。通過這次信號(hào)處理項(xiàng)目,我們終于明白學(xué)習(xí)是一個(gè)長(zhǎng)期積累的過程,在以后的工作、生活中都應(yīng)該不斷的學(xué)習(xí),努力提高自己知識(shí)和綜合素質(zhì)??傊?,不管學(xué)會(huì)的還是學(xué)不會(huì)的的確覺得困難比較多,真是萬事開頭難,不知道如何入手。最后終于做完了有種如釋重負(fù)的感覺。此外,還得出一個(gè)結(jié)論:知識(shí)必須通過應(yīng)用才能實(shí)現(xiàn)其價(jià)值!有些東西以為學(xué)會(huì)了,但真正到用的時(shí)候才發(fā)現(xiàn)是兩回事,所以我認(rèn)為只有到真正會(huì)用的時(shí)候才是真的學(xué)會(huì)了。在此要感謝我們指導(dǎo)老師悉心的指導(dǎo),感謝老師們給我的幫助。在項(xiàng)目過程中,我們通過查閱大量有關(guān)資料,與同學(xué)交流經(jīng)驗(yàn)和自學(xué),并向老師請(qǐng)教等方式,使自己學(xué)到了不少知識(shí),也經(jīng)歷了不少艱辛,但收獲同樣巨大。在整個(gè)項(xiàng)目中我懂得了許多東西,也培養(yǎng)了我們工作的能力,樹立了對(duì)自己工作能力的信心。而且大大提高了動(dòng)手的能力,使我們充分體會(huì)到了在創(chuàng)造過程中探索的艱難和成功時(shí)的喜悅。雖然這個(gè)項(xiàng)目做的也不太好,但是在項(xiàng)目過程中所學(xué)到的東西是這次項(xiàng)目的最大收獲和財(cái)富,使我們終身受益。七、參考文獻(xiàn)1J.S.park。matlab gui tutorial for beginners。 University of Incheon。 2 易克初,等.語音信號(hào)處理M.北京:國(guó)防工業(yè)出版社,2006,6.3胡航.語音信號(hào)處理M.哈爾濱:哈爾濱工業(yè)大學(xué)出版社,2000,5.4韓紀(jì)慶,張磊,鄭鐵然.語音信號(hào)處理M.北京:清華大學(xué)出版社,20045彭軍。一個(gè)實(shí)例搞定matlab界面編程。八、附錄(程序代碼及元件清單)function varargout = open_the_road_5(varargin)% OPEN_THE_ROAD_5 M-file for open_the_road_5.fig% OPEN_THE_ROAD_5, by itself, creates a new OPEN_THE_ROAD_5 or raises the existing% singleton*.% H = OPEN_THE_ROAD_5 returns the handle to a new OPEN_THE_ROAD_5 or the handle to% the existing singleton*.% OPEN_THE_ROAD_5(CALLBACK,hObject,eventData,handles,.) calls the local% function named CALLBACK in OPEN_THE_ROAD_5.M with the given input arguments.% OPEN_THE_ROAD_5(Property,Value,.) creates a new OPEN_THE_ROAD_5 or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before open_the_road_5_OpeningFcn gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to open_the_road_5_OpeningFcn via varargin.% *See GUI Options on GUIDEs 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 open_the_road_5 % Last Modified by GUIDE v2.5 28-May-2012 21:53:24 % Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, open_the_road_5_OpeningFcn, . gui_OutputFcn, open_the_road_5_OutputFcn, . gui_LayoutFcn, , . gui_Callback, );if nargin & ischar(varargin1) gui_State.gui_Callback = str2func(varargin1);end if nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT % - Executes just before open_the_road_5 is made visible.function open_the_road_5_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 open_the_road_5 (see VARARGIN) % Choose default command line output for open_the_road_5handles.output = hObject; % Update handles structureguidata(hObject, handles); % UIWAIT makes open_the_road_5 wait for user response (see UIRESUME)% uiwait(handles.figure1); % - Outputs from this function are returned to the command line.function varargout = open_the_road_5_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 structurevarargout1 = handles.output; % - Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)close(gcf)run(open_the_road_4)% hObject handle to pushbutton1 (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 pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles)close(gcf)run(open_the_road_6)% hObject handle to pushbutton2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % - Executes during object creation, after setting all properties.function figure1_CreateFcn(hObject, eventdata, handles)ha=axes(units,normalized,position,0 0 1 1);uistack(ha,down)II=imread(cauc.bmp);image(II)colormap grayset(ha,handlevisibility,off ,visible,off );% hObject handle to figure1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns calledfunction varargout = open_the_road_4(varargin)% OPEN_THE_ROAD_4 M-file for open_the_road_4.fig% OPEN_THE_ROAD_4, by itself, creates a new OPEN_THE_ROAD_4 or raises the existing% singleton*.% H = OPEN_THE_ROAD_4 returns the handle to a new OPEN_THE_ROAD_4 or the handle to% the existing singleton*.% OPEN_THE_ROAD_4(CALLBACK,hObject,eventData,handles,.) calls the local% function named CALLBACK in OPEN_THE_ROAD_4.M with the given input arguments.% OPEN_THE_ROAD_4(Property,Value,.) creates a new OPEN_THE_ROAD_4 or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before open_the_road_4_OpeningFcn gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to open_the_road_4_OpeningFcn via varargin.% *See GUI Options on GUIDEs 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 open_the_road_4 % Last Modified by GUIDE v2.5 30-May-2012 08:35:36 % Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, open_the_road_4_OpeningFcn, . gui_OutputFcn, open_the_road_4_OutputFcn, . gui_LayoutFcn, , . gui_Callback, );if nargin & ischar(varargin1) gui_State.gui_Callback = str2func(varargin1);end if nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT % - Executes just before open_the_road_4 is made visible.function open_the_road_4_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 open_the_road_3 (see VARARGIN) % Choose default command line output for open_the_road_3handles.output = hObject; % Update handles structureguidata(hObject, handles); % UIWAIT makes open_the_road_3 wait for user response (see UIRESUME)% uiwait(handles.figure1); % - Outputs from this function are returned to the command line.function varargout = open_the_road_4_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 structurevarargout1 = handles.output; % - Executes during object creation, after setting all properties.function figure1_CreateFcn(hObject, eventdata, handles)% hObject handle to figure1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % -function Untitled_1_Callback(hObject, eventdata, handles)% hObject handle to Untitled_1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function Untitled_2_Callback(hObject, eventdata, handles)% hObject handle to Untitled_2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)filename,pathname= . uigetfile(*.wav);global s;s=pathname filename;s,fs,nbits=wavread(s);sound(s,fs,nbits); % -function Untitled_3_Callback(hObject, eventdata, handles)% hObject handle to Untitled_3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global s;h=subplot(1,1,1);set(h,position,0.1 0.1 0.8 0.7);plot(s);title() % -function Untitled_4_Callback(hObject, eventdata, handles)% hObject handle to Untitled_4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global s;y=fft(s);n=0:length(y)-1;h=subplot(1,1,1);set(h,position,0.1 0.1 0.8 0.7); plot(n,abs(y);title() % -function Untitled_5_Callback(hObject, eventdata, handles)% hObject handle to Untitled_5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function Untitled_6_Callback(hObject, eventdata, handles)% hObject handle to Untitled_6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)filename,pathname= . uigetfile(*.wav);global x;x=pathname filename;x,fs,nbits=wavread(x);t=0:1/22050:(length(x)-1)/22050;d=(0.5*cos(2*pi*8000*t);x2=x+d;sound(x2,fs,nbits); % -function Untitled_7_Callback(hObject, eventdata, handles)% hObject handle to Untitled_7 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global x;t=0:1/22050:(length(x)-1)/22050;d=(0.5*cos(2*pi*8000*t);x2=x+d;subplot(2,1,2);plot(x2);title()subplot(2,1,1); plot(x);title() % -function Untitled_8_Callback(hObject, eventdata, handles)% hObject handle to Untitled_8 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global x;t=0:1/22050:(length(x)-1)/22050;d=(0.5*cos(2*pi*8000*t);x2=x+d;y2=fft(x2);y=fft(x);n=0:length(y2)-1;subplot(2,1,2);plot(n,abs(y2);title()subplot(2,1,1);plot(n,abs(y);title() % -function Untitled_9_Callback(hObject, eventdata, handles)% hObject handle to Untitled_9 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function Untitled_10_Callback(hObject, eventdata, handles)% hObject handle to Untitled_10 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)wp=0.25*pi;ws=0.3*pi;Rp=1;Rs=15;Fs=22050;Ts=1/Fs;wp1=2/Ts*tan(wp/2);ws1=2/Ts*tan(ws/2);N,Wn=buttord(wp1,ws1,Rp,Rs,s);Z,P,K=buttap(N);Bap,Aap=zp2tf(Z,P,K);b,a=lp2lp(Bap,Aap,Wn);bz,az=bilinear(b,a,Fs);H,W=freqz(bz,az);h=subplot(1,1,1);set(h,position,0.1 0.1 0.8 0.7); plot(W*Fs/(2*pi),abs(H);title() % -function Untitled_11_Callback(hObject, eventdata, handles)% hObject handle to Untitled_11 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)filename,pathname= . uigetfile(*.wav);global y;y=pathname filename;y,fs,nbits=wavread(y);t=0:1/22050:(length(y)-1)/22050;d=(0.5*cos(2*pi*8000*t);x3=y+d;wp=0.25*pi;ws=0.3*pi;Rp=1;Rs=15;Fs=22050;Ts=1/Fs;wp1=2/Ts*tan(wp/2);ws1=2/Ts*tan(ws/2);N,Wn=buttord(wp1,ws1,Rp,Rs,s);Z,P,K=buttap(N);Bap,Aap=zp2tf(Z,P,K);b,a=lp2lp(Bap,Aap,Wn);bz,az=bilinear(b,a,Fs);f1=filter(bz,az,x3);sound(f1,fs,nbits); % -function Untitled_12_Callback(hObject, eventdata, handles)% hObject handle to Untitled_12 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)global y;t=0:1/22050:(length(y)-1)/22050;d=(0.5*cos(2*pi*8000*t);x3=y+d;wp=0.25*pi;ws=0.3*pi;Rp=1;Rs=15;Fs=22050;Ts=1/Fs;wp1=2/Ts*tan(wp/2);ws1=2/Ts*tan(ws/2);N,Wn=buttord(wp1,ws1,Rp,Rs,s);Z,P,K=buttap(N);Bap,Aap=zp2tf(Z,P,K);b,a=lp2lp(Bap,Aap,Wn);bz,az=bilinear(b,a,Fs);f1=filter(bz,az,x3);subplot(3,1,3);plot(f1);title()subplot(3,1,1);plot(y);title()subplot(3,1,2);plot(x3);title() % -function Untitled_13_Callback(hObject, eventdata, handles)% hObject handle to Untitled_13 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% hand

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論