function varargout = lvboqi(varargin)
% LVBOQI MATLAB code for lvboqi.fig
% LVBOQI, by itself, creates a new LVBOQI or raises the existing
% singleton*.
%
% H = LVBOQI returns the handle to a new LVBOQI or the handle to
% the existing singleton*.
%
% LVBOQI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in LVBOQI.M with the given input arguments.
%
% LVBOQI('Property','Value',...) creates a new LVBOQI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before lvboqi_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to lvboqi_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 lvboqi
% Last Modified by GUIDE v2.5 02-Dec-2019 10:53:29
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @lvboqi_OpeningFcn, ...
'gui_OutputFcn', @lvboqi_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 lvboqi is made visible.
function lvboqi_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 lvboqi (see VARARGIN)
% Choose default command line output for lvboqi
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes lvboqi wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = lvboqi_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 AutoRun.
function AutoRun_Callback(hObject, eventdata, handles)
AutoRun_value=get(handles.AutoRun,'Value');
if(AutoRun_value==1)
AutoChoose(handles)
end
% hObject handle to AutoRun (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of AutoRun
% --- Executes on button press in Run.
function Run_Callback(hObject, eventdata, handles)
AutoChoose(handles)
% hObject handle to Run (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 Quit.
function Quit_Callback(hObject, eventdata, handles)
Close
% hObject handle to Quit (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 MinOrder.
function MinOrder_Callback(hObject, eventdata, handles)
% hObject handle to MinOrder (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
MinOrder_value=get(handles.MinOrder,'Value');
set(handles.CustomOrderButton,'Value',0);
if(MinOrder_value==1)
set(handles.Order,'visible','off');
set(handles.MinOrderDisplay,'enable','on');
else
set(handles.Order,'visible','on');
end
% Hint: get(hObject,'Value') returns toggle state of MinOrder
% --- Executes on button press in CustomOrderButton.
function CustomOrderButton_Callback(hObject, eventdata, handles)
% hObject handle to CustomOrderButton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
CustomOrderButton_value=get(handles.CustomOrderButton,'Value');
set(handles.MinOrder,'Value',0);
if(CustomOrderButton_value==1)
set(handles.Order,'visible','on');
set(handles.MinOrderDisplay,'enable','off');
else
set(handles.Order,'enable','on');
end
% Hint: get(hObject,'Value') returns toggle state of CustomOrderButton
function MinOrderDisplay_Callback(hObject, eventdata, handles)
% hObject handle to MinOrderDisplay (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 MinOrderDisplay as text
% str2double(get(hObject,'String')) returns contents of MinOrderDisplay as a double
% --- Executes during object creation, after setting all properties.
function MinOrderDisplay_CreateFcn(hObject, eventdata, handles)
% hObject handle to MinOrderDisplay (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 Order_Callback(hObject, eventdata, handles)
% hObject handle to Order (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 Order as text
% str2double(get(hObject,'String')) returns contents of Order as a double
% --- Executes during object creation, after setting all properties.
function Order_CreateFcn(hObject, eventdata, handles)
% hObject handle to Order (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 DigitalFilter.
function DigitalFilter_Callback(hObject, eventdata, handles)
% hObject handle to DigitalFilter (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
DigitalFilter_value=get(handles.DigitalFilter,'Value');
%当选择了IIR时,使窗口选项屏蔽
if(DigitalFilter_value==1)
set(handles.FilterDesign,'enable','on');
set(handles.Windows,'enable','off')
%当选择了FIR时,使IIR的滤波器(Butterworth、 ChebyshevⅠ等)选项屏蔽
else
set(handles.FilterDesign,'enable','off');
set(handles.Windows,'enable','on')
end
AutoRun_value=get(handles.AutoRun,'Value');
if(AutoRun_value==1)
AutoChoose(handles)
end
% Hints: contents = cellstr(get(hObject,'String')) returns DigitalFilter contents as cell array
% contents{get(hObject,'Value')} returns selected item from DigitalFilter
% --- Executes during object creation, after setting all properties.
function DigitalFilter_CreateFcn(hObject, eventdata, handles)
% hObject handle to DigitalFilter (