📄 birdsgui.m
字号:
function varargout = birdsgui(varargin)% BIRDSGUI M-file for birdsgui.fig% BIRDSGUI, by itself, creates a new BIRDSGUI or raises the existing% singleton*.%% H = BIRDSGUI returns the handle to a new BIRDSGUI or the handle to% the existing singleton*.%% BIRDSGUI('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in BIRDSGUI.M with the given input arguments.%% BIRDSGUI('Property','Value',...) creates a new BIRDSGUI or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before birdsgui_OpeningFunction gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to birdsgui_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 birdsgui% Last Modified by GUIDE v2.5 08-Apr-2004 13:37:29% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @birdsgui_OpeningFcn, ... 'gui_OutputFcn', @birdsgui_OutputFcn, ... 'gui_LayoutFcn', @birdsgui_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 birdsgui is made visible.function birdsgui_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 birdsgui (see VARARGIN)% Choose default command line output for birdsguihandles.output = hObject;guidata(hObject, handles);set(gcf,'UserData',handles);birdsfn;% UIWAIT makes birdsgui wait for user response (see UIRESUME)% uiwait(handles.birdsgui_fig);% --- Outputs from this function are returned to the command line.function varargout = birdsgui_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 birdlist_CreateFcn(hObject, eventdata, handles)% hObject handle to birdlist (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 birdlist_Callback(hObject, eventdata, handles)% hObject handle to birdlist (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 birdlist as text% str2double(get(hObject,'String')) returns contents of birdlist as a double% --- 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) birdsfn 'play';% --- Executes during object creation, after setting all properties.function randamp_CreateFcn(hObject, eventdata, handles)% hObject handle to randamp (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 randamp_Callback(hObject, eventdata, handles)% hObject handle to randamp (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 randamp as text% str2double(get(hObject,'String')) returns contents of randamp as a double% --- Executes during object creation, after setting all properties.function randfreq_CreateFcn(hObject, eventdata, handles)% hObject handle to randfreq (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 randfreq_Callback(hObject, eventdata, handles)% hObject handle to randfreq (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 randfreq as text% str2double(get(hObject,'String')) returns contents of randfreq as a double% --- Executes during object creation, after setting all properties.function randtime_CreateFcn(hObject, eventdata, handles)% hObject handle to randtime (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 randtime_Callback(hObject, eventdata, handles)% hObject handle to randtime (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 randtime as text% str2double(get(hObject,'String')) returns contents of randtime as a double% --- Executes during object creation, after setting all properties.function timestretch_CreateFcn(hObject, eventdata, handles)% hObject handle to timestretch (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 timestretch_Callback(hObject, eventdata, handles)% hObject handle to timestretch (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 timestretch as text% str2double(get(hObject,'String')) returns contents of timestretch as a double% --------------------------------------------------------------------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) birdsfn 'help';% --- Executes on button press in plot.function plot_Callback(hObject, eventdata, handles)% hObject handle to plot (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) birdsfn 'plot';% --------------------------------------------------------------------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)% --------------------------------------------------------------------function save_Callback(hObject, eventdata, handles)% hObject handle to save (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) birdsfn 'save';% --------------------------------------------------------------------function close_Callback(hObject, eventdata, handles)% hObject handle to close (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) birdsfn 'close';% --------------------------------------------------------------------function Untitled_2_Callback(hObject, eventdata, handles)% hObject handle to Untitled_2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% --------------------------------------------------------------------function sonogram_Callback(hObject, eventdata, handles)% hObject handle to sonogram (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) birdsfn 'sonogram';% --------------------------------------------------------------------function fourier_Callback(hObject, eventdata, handles)% hObject handle to fourier (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) birdsfn 'fourier';
% --- Creates and returns a handle to the GUI figure.
function h1 = birdsgui_LayoutFcn(policy)
% policy - create a new figure or use a singleton. 'new' or 'reuse'.
persistent hsingleton;
if strcmpi(policy, 'reuse') & ishandle(hsingleton)
h1 = hsingleton;
return;
end
h1 = figure(...
'Units','characters',...
'Color',[0.925490196078431 0.913725490196078 0.847058823529412],...
'Colormap',[0 0 0.5625;0 0 0.625;0 0 0.6875;0 0 0.75;0 0 0.8125;0 0 0.875;0 0 0.9375;0 0 1;0 0.0625 1;0 0.125 1;0 0.1875 1;0 0.25 1;0 0.3125 1;0 0.375 1;0 0.4375 1;0 0.5 1;0 0.5625 1;0 0.625 1;0 0.6875 1;0 0.75 1;0 0.8125 1;0 0.875 1;0 0.9375 1;0 1 1;0.0625 1 1;0.125 1 0.9375;0.1875 1 0.875;0.25 1 0.8125;0.3125 1 0.75;0.375 1 0.6875;0.4375 1 0.625;0.5 1 0.5625;0.5625 1 0.5;0.625 1 0.4375;0.6875 1 0.375;0.75 1 0.3125;0.8125 1 0.25;0.875 1 0.1875;0.9375 1 0.125;1 1 0.0625;1 1 0;1 0.9375 0;1 0.875 0;1 0.8125 0;1 0.75 0;1 0.6875 0;1 0.625 0;1 0.5625 0;1 0.5 0;1 0.4375 0;1 0.375 0;1 0.3125 0;1 0.25 0;1 0.1875 0;1 0.125 0;1 0.0625 0;1 0 0;0.9375 0 0;0.875 0 0;0.8125 0 0;0.75 0 0;0.6875 0 0;0.625 0 0;0.5625 0 0],...
'IntegerHandle','off',...
'InvertHardcopy',get(0,'defaultfigureInvertHardcopy'),...
'MenuBar','none',...
'Name','birds',...
'NumberTitle','off',...
'PaperPosition',get(0,'defaultfigurePaperPosition'),...
'Position',[103.8 23.4615384615385 67.5 38],...
'Renderer',get(0,'defaultfigureRenderer'),...
'RendererMode','manual',...
'Resize','off',...
'HandleVisibility','callback',...
'Tag','birds_fig',...
'UserData',zeros(1,0));
setappdata(h1, 'GUIDEOptions', struct(...
'active_h', [], ...
'taginfo', struct(...
'figure', 2, ...
'edit', 6, ...
'pushbutton', 3, ...
'listbox', 2, ...
'text', 6), ...
'override', 0, ...
'release', 13, ...
'resize', 'none', ...
'accessibility', 'callback', ...
'mfile', 1, ...
'callbacks', 1, ...
'singleton', 1, ...
'syscolorfig', 1, ...
'blocking', 0, ...
'lastSavedFile', 'C:\Documents and Settings\All Users\Documents\VLDCMCaR\SSUM\birds\birds.m'));
h2 = uicontrol(...
'Parent',h1,...
'Units','characters',...
'Callback','birdsgui(''play_Callback'',gcbo,[],guidata(gcbo))',...
'ListboxTop',0,...
'Position',[35.6666666666667 2.16666666666667 7.83333333333333 1.5],...
'String','Play',...
'Tag','play');
h3 = uicontrol(...
'Parent',h1,...
'Units','characters',...
'BackgroundColor',[1 1 1],...
'Callback','birdsgui(''birdlist_Callback'',gcbo,[],guidata(gcbo))',...
'Position',[5.83333333333333 2.16666666666667 29.1666666666667 12],...
'String','',...
'Style','listbox',...
'Value',1,...
'CreateFcn','birdsgui(''birdlist_CreateFcn'',gcbo,[],guidata(gcbo))',...
'Tag','birdlist');
h4 = uicontrol(...
'Parent',h1,...
'Units','characters',...
'BackgroundColor',[1 1 1],...
'Callback','birdsgui(''randamp_Callback'',gcbo,[],guidata(gcbo))',...
'ListboxTop',0,...
'Position',[56 7.07692307692308 10 1.46153846153846],...
'String','0',...
'Style','edit',...
'CreateFcn','birdsgui(''randamp_CreateFcn'',gcbo,[],guidata(gcbo))',...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -