资源简介
基于MATLB GUI的信号发生器可以产生正弦波、方波、指数信号及任意表达式的信号,可以设定指定信号的频率、占空比、放大系数、衰减系数等参数,也支持输入任意信号的表达式。同时具有频谱分析的功能,设定采样频率后即可对信号进行频谱分析。
代码片段和文件信息
function varargout = xinhao(varargin)
% XINHAO MATLAB code for xinhao.fig
% XINHAO by itself creates a new XINHAO or raises the existing
% singleton*.
%
% H = XINHAO returns the handle to a new XINHAO or the handle to
% the existing singleton*.
%
% XINHAO(‘CALLBACK‘hobjecteventDatahandles...) calls the local
% function named CALLBACK in XINHAO.M with the given input arguments.
%
% XINHAO(‘Property‘‘Value‘...) creates a new XINHAO or raises the
% existing singleton*. Starting from the left property value pairs are
% applied to the GUI before xinhao_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to xinhao_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 xinhao
% Last Modified by GUIDE v2.5 24-May-2013 22:48:32
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘ mfilename ...
‘gui_Singleton‘ gui_Singleton ...
‘gui_OpeningFcn‘ @xinhao_OpeningFcn ...
‘gui_OutputFcn‘ @xinhao_OutputFcn ...
‘gui_LayoutFcn‘ [] ...
‘gui_Callback‘ []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State varargin{:});
else
gui_mainfcn(gui_State varargin{:});
end
function xinhao_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 xinhao (see VARARGIN)
% Choose default command line output for xinhao
handles.output = hobject;
% Update handles structure
guidata(hobject handles);
set(handles.ZHANKONGBI‘enable‘‘off‘)
set(handles.shuaijian‘enable‘‘off‘)
set(handles.pinlv‘enable‘‘off‘)
set(handles.FUDU‘enable‘‘off‘)
set(handles.xianshi‘visible‘‘off‘)
set(handles.hanshu‘visible‘‘off‘)
set(handles.caiyangpinlv‘enable‘‘off‘)
set(handles.shijian‘enable‘‘off‘)
function varargout = xinhao_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;
function on_Callback(hobject eventdata handles)
% hobject handle to on (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and u
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 11387 2013-05-27 22:52 软面板信号发生器测试\xinhao.fig
文件 22911 2013-05-27 23:19 软面板信号发生器测试\xinhao.m
目录 0 2016-05-30 10:07 软面板信号发生器测试
----------- --------- ---------- ----- ----
34298 3
- 上一篇:高斯过程回归matlab代码
- 下一篇:模式识别第4版中文版+英文版+PPT源码)
评论
共有 条评论