matlab频谱分析仪

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

%
%
GUOJING('CALLBACK',hObject,eventData,handles,...) calls the
local
%
function named CALLBACK in GUOJING.M with the given input
arguments.
%
%
GUOJING('Property','Value',...) creates a new GUOJING or
% --- Outputs from this function are returned to the command line. function varargout = guojing_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;
2
% --- Executes on button press in soundcard. function soundcard_Callback(hObject, eventdata, handles) % hObject handle to soundcard (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Choose default command line output for guojing
handles.output = hObject;
% Update handles structure guidata(hObject, handles);
% UIWAIT makes guojing wait for user response (see UIRESUME) % uiwait(handles.figure1);
if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else gui_mainfcn(gui_State, varargin{:});
end % End initialization code - DO NOT EDIT
% Hints: get(hObject,'String') returns contents of recordtime as text
%
str2double(get(hObject,'String')) returns contents of
recordtime as a double
% --- Executes during object creation, after setting all properties. function recordtime_CreateFcn(hObject, eventdata, handles) % hObject handle to recordtime (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called
% Hint: get(hObject,'Value') returns toggle state of soundcard set(findobj('Tag','recordtime'),'enable','on'); h=findobj('Tag','filename'); set(h,'enable','off'); h=findobj('Tag','freq'); set(h,'enable','off'); h=findobj('Tag','amp'); set(h,'enable','off'); h=findobj('Tag','phase'); set(h,'enable','off'); set(handles.channel,'enable','off'); set(handles.fileopen,'enable','off'); set(handles.gensig,'enable','off'); set(handles.wavetype,'enable','off'); set(handles.add,'enable','off'); set(handles.startrecord,'enable','on');
gui_Singleton = 1;
gui_State = struct('gui_Name',
mfilename, ...
'gui_Singleton', gui_Singleton, ...
1
'gui_OpeningFcn', @guojing_OpeningFcn, ... 'gui_OutputFcn', @guojing_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end
3
set(handles.channel,'enable','off'); set(handles.fileopen,'enable','off'); set(handles.gensig,'enable','on'); set(handles.wavetype,'enable','on'); set(handles.add,'enable','on'); set(handles.startrecord,'enable','off');
% --- Executes on button press in generator. function generator_Callback(hObject, eventdata, handles) % hObject handle to generator (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
applicnputs are passed to guojing_OpeningFcn via
varargin.
%
%
*See GUI Options on GUIDE's Tools menu. Choose "GUI allows
only one
%
instance to run (singleton)".
function recordtime_Callback(hObject, eventdata, handles) % hObject handle to recordtime (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if
ispc
&&
isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
% --- Executes just before guojing is made visible. function guojing_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 guojing (see VARARGIN)
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help guojing
% Last Modified by GUIDE v2.5 02-Nov-2011 22:54:25
% Begin initialization code - DO NOT EDIT
%
GUOJING, by itself, creates a new GUOJING or raises the
existing
%
singleton*.
%
%
H = GUOJING returns the handle to a new GUOJING or the handle
to
%
the existing singleton*.
raises the
%
existing singleton*. Starting from the left, property value
pairs are
%
applied to the GUI before guojing_OpeningFunction gets called.
An
%
unrecognized property name or invalid value makes property
% Hint: get(hObject,'Value') returns toggle state of generator h=findobj('Tag','filename'); set(h,'enable','off'); h=findobj('Tag','freq'); set(h,'enable','on'); h=findobj('Tag','amp'); set(h,'enable','on'); h=findobj('Tag','phase'); set(h,'enable','on'); set(findobj('Tag','recordtime'),'enable','off');
参考以上界面和代码查阅相关资料构建交互界面设计一个音频频谱分析仪实现相应的功能
三、实验内容:
参考以上界面和代码,查阅相关资料,构建交互界面,设计一个音频频谱分析仪,实现
相应的功能。
四、实验代码:
function varargout = guojing(varargin)
% GUOJING M-file for guojing.fig
相关文档
最新文档