【正文】
ble(get(,39。y2=sin(n.*t)。 plot(t,y)。 濾波的效果濾波前的信號圖:m=2; n=5濾波后圖形; 第四章 界面設定在設計過程中,可以對比濾波器幅頻相頻特性和設計要求,隨時調(diào)整參數(shù)和濾波器類型,以便得到最佳效果。使用方法:1,在信號輸入通道中可以選擇濾波器種類。5,再按‘濾波后圖形‘按鈕,得出經(jīng)濾波后圖形。 總結(jié)經(jīng)過一周的課程設計,使我們學到了很多,并且明白熟練掌握MATLAB軟件的使用是非常重要的,整個課程設計過程中,我們都要用到它。但經(jīng)過思考并仔細檢查,最后得以編譯成功。MATLAB 信號處理工具箱為濾波器設計及分析提供了非常優(yōu)秀的輔助設計工具, 在設計數(shù)字濾波器時, 善于應用MATLAB進行輔助設計, 能夠大大提高設計效率。,hObject,eventData,handles,...) calls the local% function named CALLBACK in with the given input arguments.%% LYL(39。,...) creates a new LYL or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before lyl_OpeningF gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to lyl_OpeningF via varargin.%% *See GUI Options on GUIDE39。, mfilename, ... 39。, lyl_OpeningF, ... 39。, [] , ... 39。amp。end% End initialization code DO NOT EDIT % Executes just before lyl is made visible.function lyl_OpeningF(hObject, eventdata, handles, varargin)% This function has no output args, see OutputF.% 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 mand line arguments to lyl (see VARARGIN) % Choose default mand line output for lyl = hObject。% 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 mand line output from handles structurevarargout{1} = 。String39。BackgroundColor39。BackgroundColor39。end function edit2_Callback(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,39。)) returns contents of edit2 as a double % Executes during object creation, after setting all properties.function edit2_CreateF(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved to be defined in a future version of MATLAB% handles empty handles not created until after all CreateFs called % Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc amp。), get(0,39。,39。String39。amp。defaultUicontrolBackgroundColor39。white39。) returns contents of edit4 as text% str2double(get(hObject,39。 isequal(get(hObject,39。)) set(hObject,39。)。String39。BackgroundColor39。BackgroundColor39。end function edit6_Callback(hObject, eventdata, handles)% hObject handle to edit6 (see GCBO)% eventdata reserved to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,39。)) returns contents of edit6 as a double % Executes during object creation, after setting all properties.function edit6_CreateF(hObject, eventdata, handles)% hObject handle to edit6 (see GCBO)% eventdata reserved to be defined in a future version of MATLAB% handles empty handles not created until after all CreateFs called % Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc amp。), get(0,39。,39。String39。amp。defaultUicontrolBackgroundColor39。white39。) returns contents of edit8 as text% str2double(get(hObject,39。 isequal(get(hObject,39。)) set(hObject,39。)。String39。BackgroundColor39。BackgroundColor39。end % Executes on selection change in pushbutton1.function kj1_Callback(hObject, eventdata, handles)% 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) global t。% Hints: contents = get(hObject,39。)} returns selected item from pushbutton1 % Executes during object creation, after setting all properties.function pushbutton1_CreateF(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)% eventdata reserved to be defined in a future version of MATLAB% handles empty handles not created until after all CreateFs called % Hint: popupmenu controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc amp。), get(0,39。,39。%t=str2double(get(,39。String39。201。181。170。218。253。 Ws=str2double(get(,39。232。233。175。248。180。214。194。))。 %201。205。238。205。203。 [N,Wc]=buttord(Wp,Ws,Ap,As,39。247。175。205。214。203。247。[B,A]=butter(N,Wc,39。247。175。232。205。214。203。247。182。182。194。 [D,C]=impinvar(B,A,fs)。195。229。166。228。 %198。207。 plot(W/pi,abs(Hz)/abs(Hz(1)))。246。216。185。181。194。198。204。199。 grid on。204。203。205。214。168。)。ylabel(39。String39。214。209。198。201。181。170。218。253。 Ws= str2double(get(,39。232。233。175。248。180。214。194。))。 %201。205。238。205。203。 [N,Wc]=buttord(Wp,Ws,Ap,As,39。247。175。205。214。203。247。[B,A]=butter(N,Wc, 39。)。195。253。198。216。185。168。 %214。210。198。214。247。246。236。187。168。187。194。211。230。205。214。253。205。178。181。198。208。207。176。206。184。202。203。247。Frequency/Hz39。)。 %201。178。214。 c1=str2double(get(,39。String39。))。fs=1/T。249。202。220。185。Ws=[b1 b2]。195。187。168。205。189。198。Ap= str2double(get(,39。String39。214。180。243。208。188。)。195。253。168。216。185。168。202。,39。247。175。232。205。214。203。247。182。182。194。 [D,C]=impinvar(B,A,fs)。195。229。166。228。 %198。207。 plot(W/pi,abs(Hz))。246。216。185。184。194。198。204。199。grid on。204。203。205。214。168。)。ylabel(39。String39。String39。))。b2=str2double(get(,39。Ws=[b1 b2]。195。187。168。205。189。198。Ap= str2double(get(,39。String39。214。180。243。208。188。)。195。253。168。216。185。168。202。,39。247。175。232。205。214。203。247。182。182。194。 [D,C]=impinvar(B,A,fs)。195。229。166。228。 %198。207。 plot(W/pi,abs(Hz))。246。216。185。184。194。198。204。199。grid on。204。203。202。203。247。Frequency/Hz39。)。amp。defaultUicontrolBackgroundColor39。white39。String39。))。 % plot(f,abs(fx(n+1))*2/N)。 % Executes on button press in pushbutton3.function pushbutton3_Callback(hObject, eventdata, handles)% hObject handle to pushbutton3 (see GCBO)% eventdata reserved to be defined i