function varargout = signal(varargin)
% SIGNAL M-file for signal.fig
% SIGNAL, by itself, creates a new SIGNAL or raises the existing
% singleton*.
%
% H = SIGNAL returns the handle to a new SIGNAL or the handle to
% the existing singleton*.
%
% SIGNAL('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in SIGNAL.M with the given input arguments.
%
% SIGNAL('Property','Value',...) creates a new SIGNAL or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before signal_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to signal_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
% Copyright 2002-2003 The MathWorks, Inc.
% Edit the above text to modify the response to help signal
% Last Modified by GUIDE v2.5 05-Mar-2011 14:02:23
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @signal_OpeningFcn, ...
'gui_OutputFcn', @signal_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
% End initialization code - DO NOT EDIT
% --- Executes just before signal is made visible.
function signal_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 signal (see VARARGIN)
% Choose default command line output for signal
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes signal wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = signal_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;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
global y1;
axes(handles.A);
t=-5:0.01:5;
y1=sin(2*t);
plot(t,y1)
title('f1(t)');
axis([-5 ,5 ,-2 ,2])
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
global y1;
axes(handles.A);
t=-5:0.01:5;
y1=rectpuls(t-1,2);%t=1��2
plot(t,y1)
title('f1(t)');
axis([-5 ,5 ,-2 ,2])
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
global y1;
axes(handles.A);
t=-5:0.01:5;
y1=square(4*pi*t);
plot(t,y1)
title('f1(t)');
axis([-5 ,5 ,-2 ,2])
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
global y2;
axes(handles.B)
t=-5:0.01:5;
y2=sin(2*t);
plot(t,y2)
title('f2(t)');
axis([-5 ,5 ,-2 ,2])
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
global y2;
axes(handles.B)
t=-5:0.01:5;
y2=rectpuls(t-1,2);%t=1��2
plot(t,y2)
title('f2(t)');
axis([-5 ,5 ,-2 ,2])
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
global y2;
axes(handles.B)
t=-5:0.01:5;
y2=square(4*pi*t);
plot(t,y2)
title('f2(t)');
axis([-5 ,5 ,-2 ,2])
% hObject handle to pushbutton6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in P1.
function P1_Callback(hObject, eventdata, handles)
global y1;
global y2;
axes(handles.C)
t=-5:0.01:5;
ft3= y1+y2;
plot(t,ft3);
title('f3(t)=f1(t)+f(2)')
% hObject handle to P1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in P2.
function P2_Callback(hObject, eventdata, handles)
global y1;
global y2;
axes(handles.C)
t=-5:0.01:5;
ft3= y1.*y2;
plot(t,ft3);
title('f3(t)=f1(t).f2(t)')
% hObject handle to P2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
global y1;
global y2;
axes(handles.C)
t=-10:0.01:10;
ft3=conv(y1,y2);
ft3=ft3*0.001;
plot(t,ft3);
title('f3(t)=f1(t)*f2(t)')
% hObject handle to pushbutton9 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton10.
function pushbutton10_Callback(hObject, eventdata, handles)
global y1;
axes(handles.A)
t=-5:0.01:5;
y1=sawtooth(2*pi*t);
plot(t,y1)
title('f1(t)')
axis([-5 ,5 ,-2 ,2])
% hObject handle to pushbutton10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton11.
function pushbutton11_Callback(hObject, eventdata, handles)
global y2;
axes(handles.B)
t=-5:0.01:5;
y2=sawtooth(2*pi*t);
plot(t,y2)
title('f1(t)')
axis([-5 ,5 ,-2 ,2])
% hObject handle to pushbutton11 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in radiobutton1.
function radiobutton1_Callback(hObject, eventdata, handles)
global y1;
axes(handles.A)
t=-5:0.01:5;
plot(-t,y1)
title('f1(-t)');
axis([-5 ,5 ,-2 ,2])
% hObject handle to radiobutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of radiobutton1
% --- Executes on button press in radiobutton2.
function radiobutton2_Callback(hObject, eventdata, handles)
g
GUI.rar_GUI 数据处理_GUI读取_gui 基本信号_界面 matlab
版权申诉
5星 · 超过95%的资源 32 浏览量
2022-07-15
16:24:18
上传
评论
收藏 21KB RAR 举报
周楷雯
- 粉丝: 80
- 资源: 1万+
最新资源
- 基于matlab实现字符识别的参考程序,用所用的字体识别率挺高,部分手写的也能识别,但是还不能识别扭曲和倾斜的字符 .rar
- 基于matlab实现指纹识别系统 包括数据库导入、图像选择识别、帮助功能、识别图像可视、gabor滤波可视,实现界面操作.rar
- 基于matlab实现指纹识别,利用gabor滤波器,提取指纹特征,只能呢读取bmp图像.rar
- 基于matlab实现于数字图像相关方法中散斑质量评价
- 基于matlab实现遗传算法和佳点集遗传算法的基本思想和不同点,用遗传算法测试一标准函数 佳点集算法测试一标准函数
- tensorflow-gpu-2.5.1-cp38-cp38-manylinux2010-x86-64.whl
- tensorflow-gpu-2.5.0-cp39-cp39-manylinux2010-x86-64.whl
- tensorflow-gpu-2.5.2-cp39-cp39-manylinux2010-x86-64.whl
- 内含方正小标宋简体、仿宋-Gb2312、黑体、楷体、宋体,五个公文常用字体
- 记忆卡牌游戏源码及可运行文件
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论1