⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bysj.m

📁 我自己的毕业设计 软件部分 大家可以对GUI有个熟悉 加油
💻 M
📖 第 1 页 / 共 5 页
字号:
function varargout = bysj(varargin)% BYSJ M-file for bysj.fig%      BYSJ, by itself, creates a new BYSJ or raises the existing%      singleton*.%%      H = BYSJ returns the handle to a new BYSJ or the handle to%      the existing singleton*.%%      BYSJ('Property','Value',...) creates a new BYSJ using the%      given property value pairs. Unrecognized properties are passed via%      varargin to bysj_OpeningFcn.  This calling syntax produces a%      warning when there is an existing singleton*.%%      BYSJ('CALLBACK') and BYSJ('CALLBACK',hObject,...) call the%      local function named CALLBACK in BYSJ.M with the given input%      arguments.%%      *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_phase_diff to modify the response to help bysj% Last Modified by GUIDE v2.5 16-May-2007 22:43:03% Begin initialization code - DO NOT EDIT% %不要更改gui_Singleton = 1;gui_State = struct('gui_Name',       mfilename, ...                   'gui_Singleton',  gui_Singleton, ...                   'gui_OpeningFcn', @bysj_OpeningFcn, ...                   'gui_OutputFcn',  @bysj_OutputFcn, ...                   'gui_LayoutFcn',  [], ...                   'gui_Callback',   []);if nargin & isstr(varargin{1})    gui_State.gui_Callback = str2func(varargin{1});endif 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 bysj is made visible.function bysj_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   unrecognized PropertyName/PropertyValue pairs from the%            command line (see VARARGIN)% Choose default command line output for bysjhandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes bysj wait for user response (see UIRESUME)% uiwait(handles.figure1);global eel xstart xend ystart yend m_amp_array m_phase_array register_levels m_add_stateeel = 1;register_levels = 1;%其实一开始多级均衡寄存器里面是一级都没有的,第一次累加的时候将前两级的结果存入寄存器 所以显示2 这里设为1 方便计算而已m_add_state = 0;xstart = str2num(get(findobj('Tag','edit_xstart'),'string'));ystart = str2num(get(findobj('Tag','edit_ystart'),'string'));xend   = str2num(get(findobj('Tag','edit_xend'),'string'));yend   = str2num(get(findobj('Tag','edit_yend'),'string'));m_amp_array = linspace(0,0,201);  %(1*201)的全0数组做为基础累加数组m_phase_array = linspace(0,0,201);  %(1*201)的全0数组做为基础累加数组% path = 'C:\Documents and Settings\Administrator\桌面\bysj help\首页.htm';% set(gcf,'HelpFcn','web(path)');% --- Outputs from this function are returned to the command line.function varargout = bysj_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 structurevarargout{1} = handles.output;% --- Executes during object creation, after setting all properties.function popupmenu2_CreateFcn(hObject, eventdata, handles)% hObject    handle to popupmenu2 (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    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction popupmenu2_Callback(hObject, eventdata, handles)% hObject    handle to popupmenu2 (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 popupmenu2 as text_phase_diff%        str2double(get(hObject,'String')) returns contents of popupmenu2 as a doubleglobal eelpopup_eel_index = get(findobj('Tag','popupmenu2'),'value');switch popup_eel_index    case 1        eel = 1;    case 2        eel = 2;endif eel == 1    set(findobj('tag','edit_cf_2'),'enable','off');    set(findobj('tag','edit_att_2'),'enable','off');    set(findobj('tag','slider_cf2'),'enable','off');    set(findobj('tag','slider_att2'),'enable','off');    set(findobj('tag','edit_slider_cf2_start'),'enable','off');    set(findobj('tag','edit_slider_cf2_end'),'enable','off');    set(findobj('tag','edit_slider_att2_start'),'enable','off');    set(findobj('tag','edit_slider_att2_end'),'enable','off');else    set(findobj('tag','edit_cf_2'),'enable','on');    set(findobj('tag','edit_att_2'),'enable','on');    set(findobj('tag','slider_cf2'),'enable','on');    set(findobj('tag','slider_att2'),'enable','on');    set(findobj('tag','edit_slider_cf2_start'),'enable','on');    set(findobj('tag','edit_slider_cf2_end'),'enable','on');    set(findobj('tag','edit_slider_att2_start'),'enable','on');    set(findobj('tag','edit_slider_att2_end'),'enable','on');end% --- Executes during object creation, after setting all properties.function edit_cf_1_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit_cf_1 (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    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction edit_cf_1_Callback(hObject, eventdata, handles)% hObject    handle to edit_cf_1 (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 edit_cf_1 as text_phase_diff%        str2double(get(hObject,'String')) returns contents of edit_cf_1 as a double% --- Executes during object creation, after setting all properties.function edit_att_1_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit_att_1 (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    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction edit_att_1_Callback(hObject, eventdata, handles)% hObject    handle to edit_att_1 (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 edit_att_1 as text_phase_diff%        str2double(get(hObject,'String')) returns contents of edit_att_1 as a double% --- Executes during object creation, after setting all properties.function edit_cf_2_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit_cf_2 (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    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction edit_cf_2_Callback(hObject, eventdata, handles)% hObject    handle to edit_cf_2 (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 edit_cf_2 as text_phase_diff%        str2double(get(hObject,'String')) returns contents of edit_cf_2 as a double% --- Executes during object creation, after setting all properties.function edit_att_2_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit_att_2 (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    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction edit_att_2_Callback(hObject, eventdata, handles)% hObject    handle to edit_att_2 (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 edit_att_2 as text_phase_diff%        str2double(get(hObject,'String')) returns contents of edit_att_2 as a double% --- Executes during object creation, after setting all properties.function popupmenu1_CreateFcn(hObject, eventdata, handles)% hObject    handle to popupmenu1 (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    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on selection change in popupmenu1.function popupmenu1_Callback(hObject, eventdata, handles)% hObject    handle to popupmenu1 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: contents = get(hObject,'String') returns popupmenu1 contents as cell array%        contents{get(hObject,'Value')} returns selected item from popupmenu1% --- Executes during object creation, after setting all properties.function edit_xstart_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit_xstart (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    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction edit_xstart_Callback(hObject, eventdata, handles)% hObject    handle to edit_xstart (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 edit_xstart as text_phase_diff%        str2double(get(hObject,'String')) returns contents of edit_xstart as a double% --- Executes during object creation, after setting all properties.function edit_ystart_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit_ystart (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    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -