【濾波器】基于FIR+IIR濾波器實現(xiàn)音頻信號去噪含Matlab源碼
?1 簡介
針對傳統(tǒng)的濾波器設(shè)計方法效率低,方法復(fù)雜,不能滿足高效高精度的需要等缺點,基于 MATLAB 研究了分別使用窗函數(shù)法和雙線性變換法的 FIR 和 IIR 濾波器.將加入噪聲的信號分別通過兩種濾波器,濾除加入的噪聲,對濾波前后的信號進行對比分析.通過仿真實驗表明, FIR 濾波器與 IIR 的 Butterworth 濾波器都能很好地克服傳統(tǒng)濾波器的不足,通過語譜圖直觀地對比發(fā)現(xiàn)基于窗函數(shù)法設(shè)計 FIR 濾波器比雙線性法設(shè)計的 Butterworth 濾波器能更好地達到預(yù)定的去噪效果.
2 部分代碼
function varargout = filter_2(varargin)
% FILTER_2 MATLAB code for filter_2.fig
% ? ? ?FILTER_2, by itself, creates a new FILTER_2 or raises the existing
% ? ? ?singleton*.
%
% ? ? ?H = FILTER_2 returns the handle to a new FILTER_2 or the handle to
% ? ? ?the existing singleton*.
%
% ? ? ?FILTER_2('CALLBACK',hObject,eventData,handles,...) calls the local
% ? ? ?function named CALLBACK in FILTER_2.M with the given input arguments.
%
% ? ? ?FILTER_2('Property','Value',...) creates a new FILTER_2 or raises the
% ? ? ?existing singleton*. ?Starting from the left, property value pairs are
% ? ? ?applied to the GUI before filter_2_OpeningFcn gets called. ?An
% ? ? ?unrecognized property name or invalid value makes property application
% ? ? ?stop. ?All inputs are passed to filter_2_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 filter_2
% Last Modified by GUIDE v2.5 16-May-2013 12:02:23
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', ? ? ? mfilename, ...
? ?'gui_Singleton', ?gui_Singleton, ...
? ?'gui_OpeningFcn', @filter_2_OpeningFcn, ...
? ?'gui_OutputFcn', ?@filter_2_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 filter_2 is made visible.
function filter_2_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 filter_2 (see VARARGIN)
global response;
global analog;
global window1;
global digital;
global analog_choose;
response=1;
analog=1;
analog_choose=1;
window1=1;
digital=1;
%set(handles.function_value,'String','Butterworth');
%set(handles.method_value,'String','direct form');
set(handles.order,'Enable','off');
% Choose default command line output for filter_2
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes filter_2 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = filter_2_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 structure
varargout{1} = handles.output;
% --- Executes on button press in IIR_button.
function IIR_button_Callback(hObject, eventdata, handles)
% hObject ? ?handle to IIR_button (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?structure with handles and user data (see GUIDATA)
global ?analog_choose;
global response;
global analog;
if(get(hObject,'Value')==1) ?%當選中IIR時屏蔽FIR模塊
? ?set(handles.order_information,'String','order');
? ?set(handles.FIR_button,'Value',0);
? ?set(handles.filter_information,'String','IIR');
? ?set(handles.window_function,'Enable','off');
? ?set(handles.order,'Enable','off');
? ?set(handles.view_window,'Enable','off');
? ?set(handles.analog_filter,'Enable','on');
? ?set(handles.Apass,'Enable','on');
? ?set(handles.Astop,'Enable','on');
? ?set(handles.order,'Enable','off');
? ?
? ? set(handles.specify_order,'Enable','on'); set(handles.specify_order,'Value',0);%對階數(shù)的處理
? ? ? ? set(handles.custom_order,'Enable','on');set(handles.custom_order,'String','');
? ? ? ?set(handles.min_order,'Enable','on');set(handles.min_order,'Value',0);
? ?
? ?%get(handles.analog_method,'Value');
? ?if( analog_choose==1)
? ? ? ?set(handles.method_value,'String','direct form');
? ?else
? ? ? ?set(handles.method_value,'String','bilinear');
? ?end
? ?switch(analog)
? ? ? ?case 1
? ? ? ? ? ?set(handles.function_value,'String','Butterworth');
? ? ? ?case 2
? ? ? ? ? ?set(handles.function_value,'String','chebyshev1');
? ? ? ?case 3
? ? ? ? ? ?set(handles.function_value,'String','chebyshev2');
? ?end
? ?switch(response)
? ? ? ?case 1
? ? ? ? ? ?set(handles.type_information,'String','Lowpass');
? ? ? ?case 2
? ? ? ? ? ?set(handles.type_information,'String','Highpass');
? ? ? ?case 3
? ? ? ? ? ?set(handles.type_information,'String','Bandpass');
? ? ? ?case 4
? ? ? ? ? ?set(handles.type_information,'String','Bandstop');
? ?end
else
? ?set(handles.window_function,'Enable','on');
? ?set(handles.order,'Enable','on');
? ?set(handles.view_window,'Enable','on');
? ?set(handles.order,'Enable','on');
end
% Hint: get(hObject,'Value') returns toggle state of IIR_button
% --- Executes on button press in FIR_button.
function FIR_button_Callback(hObject, eventdata, handles)
% hObject ? ?handle to FIR_button (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?structure with handles and user data (see GUIDATA)
global digital;
global response;
global window1;
if(get(hObject,'Value')==1) ?%當選中FIR時屏蔽IIR模塊
? ?set(handles.IIR_button,'Value',0);
? ?set(handles.filter_information,'String','FIR');
? ?set(handles.window_function,'Enable','on');
? % set(handles.order,'Enable','on');
? ?set(handles.view_window,'Enable','on');
? ?set(handles.analog_filter,'Enable','off');
? ?set(handles.Apass,'Enable','off');
? ?set(handles.Astop,'Enable','off');
? ?%set(handles.order,'Enable','on');
?
? if(digital==2)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%處理階數(shù)
? ? ? ?set(handles.specify_order,'Enable','off');
? ? ? ?set(handles.custom_order,'Enable','off');
? ? ? ?set(handles.min_order,'Enable','off');
? ? ? ?set(handles.window_function,'Enable','off');
? ? ? ?set(handles.view_window,'Enable','off');
? ? ? ?set(handles.order_information,'String','sample')
? ? ? ?set(handles.order,'Enable','on');
? ? ? ?end
? ?
? ?switch(response)
? ? ? ?case 1
? ? ? ? ? ?set(handles.type_information,'String','Lowpass');
? ? ? ?case 2
? ? ? ? ? ?set(handles.type_information,'String','Highpass');
? ? ? ?case 3
? ? ? ? ? ?set(handles.type_information,'String','Bandpass');
? ? ? ?case 4
? ? ? ? ? ?set(handles.type_information,'String','Bandstop');
? ?end
? ?if(digital==1)
? ? ? ?set(handles.method_value,'String','window');
? ?else
? ? ? ?set(handles.method_value,'String','FSI');
? ?end
? ?switch(window1)
? ? ? ?case 1
? ? ? ? ? ?set(handles.function_value,'String','Hamming');
? ? ? ?case 2
? ? ? ? ? ?set(handles.function_value,'String','Blackman');
? ? ? ?case 3
? ? ? ? ? ?set(handles.function_value,'String','Hann');
? ? ? ?case 4
? ? ? ? ? ?set(handles.function_value,'String','Rectangular');
? ?end
else
? ?set(handles.analog_filter,'Enable','on');
? ?set(handles.Apass,'Enable','on');
? ?set(handles.Astop,'Enable','on');
? ?set(handles.order,'Enable','off');
? ?
end
% Hint: get(hObject,'Value') returns toggle state of FIR_button
% --- If Enable == 'on', executes on mouse press in 5 pixel border.
% --- Otherwise, executes on mouse press in 5 pixel border or over filter_information.
function filter_information_ButtonDownFcn(hObject, eventdata, handles)
% hObject ? ?handle to filter_information (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?structure with handles and user data (see GUIDATA)
function Fs_edit_Callback(hObject, eventdata, handles)
% hObject ? ?handle to Fs_edit (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,'String') returns contents of Fs_edit as text
% ? ? ? ?str2double(get(hObject,'String')) returns contents of Fs_edit as a double
% --- Executes during object creation, after setting all properties.
function Fs_edit_CreateFcn(hObject, eventdata, handles)
% hObject ? ?handle to Fs_edit (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% ? ? ? See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
? ?set(hObject,'BackgroundColor','white');
end
function Fstop1_edit_Callback(hObject, eventdata, handles)
% hObject ? ?handle to Fstop1_edit (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,'String') returns contents of Fstop1_edit as text
% ? ? ? ?str2double(get(hObject,'String')) returns contents of Fstop1_edit as a double
% --- Executes during object creation, after setting all properties.
function Fstop1_edit_CreateFcn(hObject, eventdata, handles)
% hObject ? ?handle to Fstop1_edit (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% ? ? ? See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
? ?set(hObject,'BackgroundColor','white');
end
function Fpass1_edit_Callback(hObject, eventdata, handles)
% hObject ? ?handle to Fpass1_edit (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,'String') returns contents of Fpass1_edit as text
% ? ? ? ?str2double(get(hObject,'String')) returns contents of Fpass1_edit as a double
% --- Executes during object creation, after setting all properties.
function Fpass1_edit_CreateFcn(hObject, eventdata, handles)
% hObject ? ?handle to Fpass1_edit (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% ? ? ? See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
? ?set(hObject,'BackgroundColor','white');
end
function Fpass2_edit_Callback(hObject, eventdata, handles)
% hObject ? ?handle to Fpass2_edit (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,'String') returns contents of Fpass2_edit as text
% ? ? ? ?str2double(get(hObject,'String')) returns contents of Fpass2_edit as a double
% --- Executes during object creation, after setting all properties.
function Fpass2_edit_CreateFcn(hObject, eventdata, handles)
% hObject ? ?handle to Fpass2_edit (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% ? ? ? See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
? ?set(hObject,'BackgroundColor','white');
end
function Fstop2_edit_Callback(hObject, eventdata, handles)
% hObject ? ?handle to Fstop2_edit (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,'String') returns contents of Fstop2_edit as text
% ? ? ? ?str2double(get(hObject,'String')) returns contents of Fstop2_edit as a double
% --- Executes during object creation, after setting all properties.
function Fstop2_edit_CreateFcn(hObject, eventdata, handles)
% hObject ? ?handle to Fstop2_edit (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% ? ? ? See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
? ?set(hObject,'BackgroundColor','white');
end
% --- Executes on selection change in filter_type.
function filter_type_Callback(hObject, eventdata, handles)
% hObject ? ?handle to filter_type (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?structure with handles and user data (see GUIDATA)
global response;
val=get(hObject,'Value');
switch val
? ?case 1
? ? ? ?set(handles.type_information,'String','Lowpass');
? ? ? ?set(handles.Fstop1,'String','Fstop');
? ? ? ?set(handles.Fpass1,'String','Fpass');
? ? ? ?set(handles.Fpass2,'Visible','off');%當為低通濾波器時屏蔽Fpass2 Fstop2并把Fstop1 Fpass1設(shè)為Fstop Fpass
? ? ? ?set(handles.Fstop2,'Visible','off');
? ? ? ?set(handles.Fpass2_edit,'Visible','off');
? ? ? ?set(handles.Fstop2_edit,'Visible','off');
? ? ? ?response=1;
? ?case 2
? ? ? ?set(handles.type_information,'String','Highpass');
? ? ? ?set(handles.Fstop1,'String','Fstop');
? ? ? ?set(handles.Fpass1,'String','Fpass');
? ? ? ?set(handles.Fpass2,'Visible','off');%當為高通濾波器時屏蔽Fpass2 Fstop2并把Fstop1 Fpass1設(shè)為Fstop Fpass
? ? ? ?set(handles.Fstop2,'Visible','off');
? ? ? ?set(handles.Fpass2_edit,'Visible','off');
? ? ? ?set(handles.Fstop2_edit,'Visible','off');
? ? ? ?response=2;
? ?case 3
? ? ? ?set(handles.type_information,'String','Bandpass');
? ? ? ?set(handles.Fstop1,'String','Fstop1');
? ? ? ?set(handles.Fpass1,'String','Fpass1');
? ? ? ?set(handles.Fpass2,'Visible','on');%當為高通濾波器時屏蔽Fpass2 Fstop2并把Fstop1 Fpass1設(shè)為Fstop Fpass
? ? ? ?set(handles.Fstop2,'Visible','on');
? ? ? ?set(handles.Fpass2_edit,'Visible','on');
? ? ? ?set(handles.Fstop2_edit,'Visible','on');
? ? ? ?response=3;
? ?case 4
? ? ? ?set(handles.type_information,'String','Bandstop');
? ? ? ?set(handles.Fstop1,'String','Fstop1');
? ? ? ?set(handles.Fpass1,'String','Fpass1');
? ? ? ?set(handles.Fpass2,'Visible','on');%當為高通濾波器時屏蔽Fpass2 Fstop2并把Fstop1 Fpass1設(shè)為Fstop Fpass
? ? ? ?set(handles.Fstop2,'Visible','on');
? ? ? ?set(handles.Fpass2_edit,'Visible','on');
? ? ? ?set(handles.Fstop2_edit,'Visible','on');
? ? ? ?response=4;
? ?otherwise
? ? ? ?set(handles.type_information,'String','Lowpass');
? ? ? ?set(handles.Fstop1,'String','Fstop');
? ? ? ?set(handles.Fpass1,'String','Fpass');
? ? ? ?set(handles.Fpass2,'Visible','off');%當為低通濾波器時屏蔽Fpass2 Fstop2并把Fstop1 Fpass1設(shè)為Fstop Fpass
? ? ? ?set(handles.Fstop2,'Visible','off');
? ? ? ?set(handles.Fpass2_edit,'Visible','off');
? ? ? ?set(handles.Fstop2_edit,'Visible','off');
? ? ? ?response=1;
end
guidata(hObject, handles);
% Hints: contents = cellstr(get(hObject,'String')) returns filter_type contents as cell array
% ? ? ? ?contents{get(hObject,'Value')} returns selected item from filter_type
% --- Executes during object creation, after setting all properties.
function filter_type_CreateFcn(hObject, eventdata, handles)
% hObject ? ?handle to filter_type (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% ? ? ? See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
? ?set(hObject,'BackgroundColor','white');
end
% --- Executes on selection change in analog_filter.
function analog_filter_Callback(hObject, eventdata, handles)
% hObject ? ?handle to analog_filter (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?structure with handles and user data (see GUIDATA)
global analog;
val_1=get(hObject,'Value');
switch val_1
? ?case 1
? ? ? ?%set(handles.analog_filter,'String','Butterworth');
? ? ? ?analog=1;set(handles.function_value,'String','Butterworth');%反饋IIR濾波器設(shè)計所用到的函數(shù)
? ?case 2
? ? ? ?set(handles.function_value,'String','ChebyshevI');
? ? ? ?analog=2;
? ?case 3
? ? ? ?set(handles.function_value,'String','ChebyshevII');
? ? ? ?analog=3;
? ?otherwise
? ? ? ?set(handles.function_value,'String','Butterworth');
? ? ? ?analog=1;
? ? ? ?
end
guidata(hObject, handles);
% Hints: contents = cellstr(get(hObject,'String')) returns analog_filter contents as cell array
% ? ? ? ?contents{get(hObject,'Value')} returns selected item from analog_filter
% --- Executes during object creation, after setting all properties.
function analog_filter_CreateFcn(hObject, eventdata, handles)
% hObject ? ?handle to analog_filter (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% ? ? ? See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
? ?set(hObject,'BackgroundColor','white');
end
% --- Executes on selection change in digital_filter.
function digital_filter_Callback(hObject, eventdata, handles)
% hObject ? ?handle to digital_filter (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?structure with handles and user data (see GUIDATA)
global digital;
val_2=get(hObject,'Value');
set(handles.order_information,'String','order');
switch val_2
? ?case 1
? ? ? ?% set(handles.digital_filter,'String','window');
? ? ? ?digital=1; set(handles.method_value,'String','window function');%反饋IIR濾波器的方法
? ? ? ?set(handles.view_window,'Enable','on');
? ? ? ?set(handles.window_function,'Enable','on');
? ? ? ?set(handles.specify_order,'Enable','on'); set(handles.specify_order,'Value',0);
? ? ? ? set(handles.custom_order,'Enable','on');set(handles.custom_order,'String','');
? ? ? ?set(handles.min_order,'Enable','on');set(handles.min_order,'Value',0);
? ? ? ?if(get(handles.FIR_button,'Value'))
? ? ? ?set(handles.order,'Enable','off');end;
? ?case 2
? ? ? ?% set(handles.digital_filter,'String','frequency response invariance');
? ? ? ?digital=2; ? set(handles.method_value,'String','FSI');
? ? ? ?set(handles.view_window,'Enable','off');
? ? ? ?set(handles.window_function,'Enable','off');
? ? ? ?set(handles.order,'Enable','on');
? ? ? ?if(get(handles.FIR_button,'Value')==1)
? ? ? ?set(handles.specify_order,'Enable','off');
? ? ? ?set(handles.custom_order,'Enable','off');
? ? ? ?set(handles.min_order,'Enable','off');
? ? ? ? set(handles.window_function,'Enable','off');
? ? ? ?set(handles.view_window,'Enable','off');
? ? ? ?set(handles.order_information,'String','sample');
? ? ? ?end
? ?otherwise
? ? ? ?% set(handles.digital_filter,'String','window');
? ? ? ?digital=1;set(handles.method_value,'String','window function');
end
guidata(hObject, handles);
% Hints: contents = cellstr(get(hObject,'String')) returns digital_filter contents as cell array
% ? ? ? ?contents{get(hObject,'Value')} returns selected item from digital_filter
% --- Executes during object creation, after setting all properties.
function digital_filter_CreateFcn(hObject, eventdata, handles)
% hObject ? ?handle to digital_filter (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% ? ? ? See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
? ?set(hObject,'BackgroundColor','white');
end
% --- Executes on selection change in window_function.
function window_function_Callback(hObject, eventdata, handles)
global window1;
val_4=get(hObject,'Value');
switch val_4
? ?case 1
? ? ? ?window1=1;set(handles.function_value,'String','Hamming');%反饋函數(shù)信息
? ?case 2
? ? ? ?window1=2; set(handles.function_value,'String','Blackman');
? ?case 3
? ? ? ?window1=3;set(handles.function_value,'String','Hann');
? ?case 4
? ? ? ?window1=4; set(handles.function_value,'String','Rectangular');
? ?otherwise
? ? ? ?% set(handles.digital_filter,'String','window');
? ? ? ?window1=1;
end
guidata(hObject, handles);
% hObject ? ?handle to window_function (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns window_function contents as cell array
% ? ? ? ?contents{get(hObject,'Value')} returns selected item from window_function
% --- Executes during object creation, after setting all properties.
function window_function_CreateFcn(hObject, eventdata, handles)
% hObject ? ?handle to window_function (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% ? ? ? See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
? ?set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in view_window.
function Apass_Callback(hObject, eventdata, handles)
% hObject ? ?handle to Apass (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,'String') returns contents of Apass as text
% ? ? ? ?str2double(get(hObject,'String')) returns contents of Apass as a double
% --- Executes during object creation, after setting all properties.
function Apass_CreateFcn(hObject, eventdata, handles)
% hObject ? ?handle to Apass (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
% handles ? ?empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% ? ? ? See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
? ?set(hObject,'BackgroundColor','white');
end
function Astop_Callback(hObject, eventdata, handles)
% hObject ? ?handle to Astop (see GCBO)
% eventdata ?reserved - to be defined in a future version of MATLAB
3 仿真結(jié)果


4 參考文獻
[1]洪燦梅, 劉愛蓮, 劉名揚,等. FIR濾波器與IIR濾波器去噪效果對比研究[J]. 微型機與應(yīng)用, 2015, 34(21):4.
博主簡介:擅長智能優(yōu)化算法、神經(jīng)網(wǎng)絡(luò)預(yù)測、信號處理、元胞自動機、圖像處理、路徑規(guī)劃、無人機等多種領(lǐng)域的Matlab仿真,相關(guān)matlab代碼問題可私信交流。
部分理論引用網(wǎng)絡(luò)文獻,若有侵權(quán)聯(lián)系博主刪除。
