📄 wavexpo.m
字号:
function varargout = wavexpo(varargin)% WAVEXPO M-file for wavexpo.fig% WAVEXPO, by itself, creates a new WAVEXPO or raises the existing% singleton*.%% H = WAVEXPO returns the handle to a new WAVEXPO or the handle to% the existing singleton*.%% WAVEXPO('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in WAVEXPO.M with the given input arguments.%% WAVEXPO('Property','Value',...) creates a new WAVEXPO or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before wavexpo_OpeningFunction gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to wavexpo_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 wavexpo% Last Modified by GUIDE v2.5 17-Mar-2004 22:21:59% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @wavexpo_OpeningFcn, ... 'gui_OutputFcn', @wavexpo_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 wavexpo is made visible.function wavexpo_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 wavexpo (see VARARGIN)% Choose default command line output for wavexpo handles.output = hObject; guidata(hObject, handles); set(gcf,'UserData',handles); wavexpofn;% --- Outputs from this function are returned to the command line.function varargout = wavexpo_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;function waveform_Callback(hObject, eventdata, handles) wavexpofn 'waveform'function spectrum_Callback(hObject, eventdata, handles) wavexpofn 'spectrum'function play_Callback(hObject, eventdata, handles) wavexpofn 'play'function write_Callback(hObject, eventdata, handles) wavexpofn 'write_soundfile'function refresh_Callback(hObject, eventdata, handles) wavexpofn 'update'% --- Executes during object creation, after setting all properties.function waveform_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes during object creation, after setting all properties.function f0_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function f0_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 0; set(gcf,'UserData',handles); wavexpofn 'fslider'% --- Executes during object creation, after setting all properties.function f0t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction f0t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 0; set(gcf,'UserData',handles); wavexpofn 'ftext'% --- Executes during object creation, after setting all properties.function f1_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function f1_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 1; set(gcf,'UserData',handles); wavexpofn 'fslider'% --- Executes during object creation, after setting all properties.function f1t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction f1t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 1; set(gcf,'UserData',handles); wavexpofn 'ftext'% --- Executes during object creation, after setting all properties.function f2_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function f2_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 2; set(gcf,'UserData',handles); wavexpofn 'fslider'% --- Executes during object creation, after setting all properties.function f2t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction f2t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 2; set(gcf,'UserData',handles); wavexpofn 'ftext'% --- Executes during object creation, after setting all properties.function f3_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function f3_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 3; set(gcf,'UserData',handles); wavexpofn 'fslider'% --- Executes during object creation, after setting all properties.function f3t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction f3t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 3; set(gcf,'UserData',handles); wavexpofn 'ftext'% --- Executes during object creation, after setting all properties.function f4_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function f4_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 4; set(gcf,'UserData',handles); wavexpofn 'fslider'% --- Executes during object creation, after setting all properties.function f4t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction f4t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 4; set(gcf,'UserData',handles); wavexpofn 'ftext'% --- Executes during object creation, after setting all properties.function f5_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function f5_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 5; set(gcf,'UserData',handles); wavexpofn 'fslider'% --- Executes during object creation, after setting all properties.function f5t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction f5t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 5; set(gcf,'UserData',handles); wavexpofn 'ftext'% --- Executes during object creation, after setting all properties.function f6_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function f6_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 6; set(gcf,'UserData',handles); wavexpofn 'fslider'% --- Executes during object creation, after setting all properties.function f6t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction f6t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 6; set(gcf,'UserData',handles); wavexpofn 'ftext'% --- Executes during object creation, after setting all properties.function f7_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function f7_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 7; set(gcf,'UserData',handles); wavexpofn 'fslider'% --- Executes during object creation, after setting all properties.function f7t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction f7t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 7; set(gcf,'UserData',handles); wavexpofn 'ftext'% --- Executes during object creation, after setting all properties.function a0_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function a0_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 0; set(gcf,'UserData',handles); wavexpofn 'aslider'% --- Executes during object creation, after setting all properties.function a0t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction a0t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 0; set(gcf,'UserData',handles); wavexpofn 'atext'% --- Executes during object creation, after setting all properties.function a1_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function a1_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 1; set(gcf,'UserData',handles); wavexpofn 'aslider'% --- Executes during object creation, after setting all properties.function a1t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction a1t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 1; set(gcf,'UserData',handles); wavexpofn 'atext'% --- Executes during object creation, after setting all properties.function a2_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function a2_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 2; set(gcf,'UserData',handles); wavexpofn 'aslider'% --- Executes during object creation, after setting all properties.function a2t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction a2t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 2; set(gcf,'UserData',handles); wavexpofn 'atext'% --- Executes during object creation, after setting all properties.function a3_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function a3_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 3; set(gcf,'UserData',handles); wavexpofn 'aslider'% --- Executes during object creation, after setting all properties.function a3t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction a3t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 3; set(gcf,'UserData',handles); wavexpofn 'atext'% --- Executes during object creation, after setting all properties.function a4_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function a4_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 4; set(gcf,'UserData',handles); wavexpofn 'aslider'% --- Executes during object creation, after setting all properties.function a4t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction a4t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 4; set(gcf,'UserData',handles); wavexpofn 'atext'% --- Executes during object creation, after setting all properties.function a5_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg set(hObject,'BackgroundColor',[.9 .9 .9]);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on slider movement.function a5_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 5; set(gcf,'UserData',handles); wavexpofn 'aslider'% --- Executes during object creation, after setting all properties.function a5t_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction a5t_Callback(hObject, eventdata, handles) handles = get(gcf,'UserData'); handles.textnum = 5; set(gcf,'UserData',handles); wavexpofn 'atext'
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -