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

📄 ksstringexpo.m

📁 非常好的数字处理教程
💻 M
📖 第 1 页 / 共 3 页
字号:
function varargout = ksstringexpo(varargin)% KSSTRINGEXPO M-file for ksstringexpo.fig%      KSSTRINGEXPO, by itself, creates a new KSSTRINGEXPO or raises the existing%      singleton*.%%      H = KSSTRINGEXPO returns the handle to a new KSSTRINGEXPO or the handle to%      the existing singleton*.%%      KSSTRINGEXPO('CALLBACK',hObject,eventData,handles,...) calls the local%      function named CALLBACK in KSSTRINGEXPO.M with the given input arguments.%%      KSSTRINGEXPO('Property','Value',...) creates a new KSSTRINGEXPO or raises the%      existing singleton*.  Starting from the left, property value pairs are%      applied to the GUI before ksstringexpo_OpeningFunction gets called.  An%      unrecognized property name or invalid value makes property application%      stop.  All inputs are passed to ksstringexpo_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 ksstringexpo% Last Modified by GUIDE v2.5 28-Feb-2005 11:30:36% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name',       mfilename, ...                   'gui_Singleton',  gui_Singleton, ...                   'gui_OpeningFcn', @ksstringexpo_OpeningFcn, ...                   'gui_OutputFcn',  @ksstringexpo_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 ksstringexpo is made visible.function ksstringexpo_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 ksstringexpo (see VARARGIN)% Choose default command line output for ksstringexpo	handles.output = hObject;	guidata(hObject, handles);	set(gcf,'UserData',handles);	ksstringexpofn;    	if (nargin > 3)		datastruct = varargin{1};		ksstringexpofn('readinput',datastruct);	end% --- Outputs from this function are returned to the command line.function varargout = ksstringexpo_OutputFcn(hObject, eventdata, handles)	varargout{1} = handles.output;% --------------------------------------------------------------------function FileMenu_Callback(hObject, eventdata, handles)% --------------------------------------------------------------------function PrintMenuItem_Callback(hObject, eventdata, handles)	ksstringexpofn 'print';% --------------------------------------------------------------------function CloseMenuItem_Callback(hObject, eventdata, handles)	ksstringexpofn 'close';% --- Executes on button press in print.function print_Callback(hObject, eventdata, handles)	ksstringexpofn 'print';% --------------------------------------------------------------------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% ----------9----------------------------------------------------------function help_Callback(hObject, eventdata, handles)% hObject    handle to help (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)    ksstringexpofn 'help';% --- Executes when ksstringexpo_fig window is resized.function ksstringexpo_fig_ResizeFcn(hObject, eventdata, handles)% hObject    handle to ksstringexpo_fig (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)    ksstringexpofn 'resize';% --- Executes on button press in play.function play_Callback(hObject, eventdata, handles)% hObject    handle to play (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)	ksstringexpofn 'play';% --- Executes on selection change in excite_menu.function excite_menu_Callback(hObject, eventdata, handles)% hObject    handle to excite_menu (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 excite_menu contents as cell array%        contents{get(hObject,'Value')} returns selected item from excite_menu    contents = get(hObject,'String');    switch contents{get(hObject,'Value')}        case 'Noise'            set(handles.excitepos_text,'Enable','off');        otherwise            set(handles.excitepos_text,'Enable','on');    end    ksstringexpofn 'excitetype';% --- Executes during object creation, after setting all properties.function excite_menu_CreateFcn(hObject, eventdata, handles)% hObject    handle to excite_menu (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');endfunction 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,'String') returns contents of edit2 as text%        str2double(get(hObject,'String')) returns contents of edit2 as a double% --- Executes during object creation, after setting all properties.function edit2_CreateFcn(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 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 model_menu.function model_menu_Callback(hObject, eventdata, handles)% hObject    handle to model_menu (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 model_menu contents as cell array%        contents{get(hObject,'Value')} returns selected item from model_menu    contents = get(hObject,'String');    switch contents{get(hObject,'Value')}        case {'Ideal'}            set(handles.loss_text,'Enable','inactive');        otherwise            set(handles.loss_text,'Enable','on');    end% --- Executes during object creation, after setting all properties.function model_menu_CreateFcn(hObject, eventdata, handles)% hObject    handle to model_menu (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');endfunction loss_Callback(hObject, eventdata, handles)% hObject    handle to loss (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 loss as text%        str2double(get(hObject,'String')) returns contents of loss as a double    val = str2num(get(hObject,'String'));	if (val > 1)		val = 1;    elseif (val < 0)        val = 0;    end	set(hObject,'String',num2str(val));% --- Executes during object creation, after setting all properties.function loss_CreateFcn(hObject, eventdata, handles)% hObject    handle to loss (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');endfunction frequency_text_Callback(hObject, eventdata, handles)% hObject    handle to frequency_text (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 frequency_text as text%        str2double(get(hObject,'String')) returns contents of frequency_text as a double    val = str2num(get(hObject,'String'));    if (val < 1)        val = 1;    end	set(hObject,'String',num2str(val));% --- Executes during object creation, after setting all properties.function frequency_text_CreateFcn(hObject, eventdata, handles)% hObject    handle to frequency_text (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');endfunction amplitude_text_Callback(hObject, eventdata, handles)% hObject    handle to amplitude_text (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 amplitude_text as text%        str2double(get(hObject,'String')) returns contents of amplitude_text as a double    val = str2num(get(hObject,'String'));	if (val > 1)		val = 1;    elseif (val < 0)

⌨️ 快捷键说明

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