function varargout = ChouYangDingLi(varargin)
% CHOUYANGDINGLI M-file for ChouYangDingLi.fig
% CHOUYANGDINGLI, by itself, creates a new CHOUYANGDINGLI or raises the existing
% singleton*.
%
% H = CHOUYANGDINGLI returns the handle to a new CHOUYANGDINGLI or the handle to
% the existing singleton*.
%
% CHOUYANGDINGLI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in CHOUYANGDINGLI.M with the given input arguments.
%
% CHOUYANGDINGLI('Property','Value',...) creates a new CHOUYANGDINGLI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before ChouYangDingLi_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to ChouYangDingLi_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 ChouYangDingLi
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ChouYangDingLi_OpeningFcn, ...
'gui_OutputFcn', @ChouYangDingLi_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 ChouYangDingLi is made visible.
function ChouYangDingLi_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 ChouYangDingLi (see VARARGIN)
% Choose default command line output for ChouYangDingLi
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes ChouYangDingLi wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = ChouYangDingLi_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 GuanBi_pushbutton.
function GuanBi_pushbutton_Callback(hObject, eventdata, handles)
% hObject handle to GuanBi_pushbutton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close;
% --- Executes on button press in start_pushbutton.
function start_pushbutton_Callback(hObject, eventdata, handles)
% hObject handle to start_pushbutton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.Ts_slider,'visible','on');
set(handles.text2,'visible','on');
set(handles.text3,'visible','on');
set(handles.text4,'visible','on');
set(handles.start_pushbutton,'visible','off');
Ts=get(handles.Ts_slider,'Value');
n=-300:300;
t=-7:0.005:7;
w=-10:0.005:10;
N=round(20*Ts/(2*pi));
handles.N=N;
ft=12*cos(2*t)./(-4*t+pi)./(4*t+pi);
Fw=3*cos(1/4*pi*w).*(heaviside(w+2)-heaviside(w-2));
fst=12*cos(2*n*Ts)./(-4*n*Ts+pi)./(4*n*Ts+pi);
for i=1:(2*N+1);
Fsw=1/Ts*(3*cos(1/4*pi*(w+N*2*pi/Ts-i*2*pi/Ts)).*(heaviside(w+N*2*pi/Ts-i*2*pi/Ts+2)-heaviside(w+N*2*pi/Ts-i*2*pi/Ts-2)));
axes(handles.XianPin_axes);
handles.a(i)=plot(w,Fsw,'color','b','linewidth',1.5);
set(gca,'ylim',[0,3.7]);
hold on;
grid on;
title('$$F_{s}(\omega )$$','interpreter','latex','fontsize',15);
end
axes(handles.YuanShi_axes);
plot(t,ft,'color','m','linewidth',1.5);
grid on;
title('$$f(t)$$','interpreter','latex','fontsize',15);
axes(handles.YuanPin_axes);
plot(w,Fw,'color','b','linewidth',1.5);
grid on;
title('$$F(\omega )$$','interpreter','latex','fontsize',15);
axes(handles.XianShi_axes);
handles.b=stem(n*Ts,fst,'color','r','marker','*','markersize',7);
hold on;
plot(t,ft,'m:');
set(gca,'xlim',[-8,8]);
grid on;
title('$$f_{s}(t)$$','interpreter','latex','fontsize',15);
H=axes('unit','normalized','position',[0,0,1,1],'visible','off');
set(gcf,'currentaxes',H);
handles.c=text(0.723,0.947,'$$T_s$$','interpreter','latex','color','b','fontsize',15);
handles.d=text(0.05,0.947,['$$T_s=',num2str(round(Ts*100)/100),',$$'],'interpreter','latex','color','b','fontsize',20);
handles.e=text(0.29,0.947,['$$\omega _s=',num2str(round(2*pi/Ts*10)/10),',$$'],'interpreter','latex','color','r','fontsize',20);
handles.f=text(0.52,0.947,'$$\omega _m=2,$$','interpreter','latex','color','m','fontsize',20);
if Ts==1.5708
set(handles.BuHunDie_text,'visible','off');
set(handles.FaShengHunDie_text,'visible','off');
set(handles.LinJieCaiYang_text,'visible','on');
end
if Ts<1.5708
set(handles.LinJieCaiYang_text,'visible','off');
set(handles.FaShengHunDie_text,'visible','off');
set(handles.BuHunDie_text,'visible','on');
end
if Ts>1.5708
set(handles.LinJieCaiYang_text,'visible','off');
set(handles.BuHunDie_text,'visible','off');
set(handles.FaShengHunDie_text,'visible','on');
end
guidata(hObject,handles);
% --- Executes on slider movement.
function Ts_slider_Callback(hObject, eventdata, handles)
% hObject handle to Ts_slider (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,'Value') returns position of slider
% get(hObject,'Min') and get(hObject,'Max') to determine range of
% slider
for i=1:2*handles.N+1;
delete(handles.a(i));
end
delete(handles.b);
delete(handles.c);
delete(handles.d);
delete(handles.e);
delete(handles.f);
start_pushbutton_Callback(hObject, eventdata, handles);
% --- Executes during object creation, after setting all properties.
function Ts_slider_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ts_slider (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background, change
% 'usewhitebg' to 0 to use default. See ISPC and COMPUTER.
usewhitebg = 1;
if usewhitebg
set(hObject,'BackgroundColor',[.9 .9 .9]);
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
飞翔的鲲
- 粉丝: 7523
- 资源: 105
最新资源
- 昆明市2005-2024年近20年历史气象数据下载
- Android studio源码,记事本,可做备忘录 纯安卓项目本地数据库sqlite 功能:登陆注册 增删改 注销 项目包含 源码+apk文件+演示视频 温馨提示~ 由于项目具有复制性,出不 ,不包
- (源代码+论文+PPT模板+配置方法)租赁乐享生活助手【java毕业设计】.zip
- java毕业设计】租房宝智能信息管家(源代码+论文+配置方法+PPT模板).zip
- 【java毕业设计】房源轻松搜管理平台(源代码+论文+配置方法+PPT模板).zip
- (源代码+论文+PPT模板+配置方法)房源直通车管理系统【java毕业设计】.zip
- (论文+配置方法+源代码+PPT模板)租赁专家房产指南(java毕业设计).zip
- 【java毕业设计】租房好帮手信息管理系统(源代码+论文+配置方法+PPT模板).zip
- (论文+PPT模板+配置方法+源代码)租房雷达信息平台(java毕业设计).zip
- (论文+PPT模板+配置方法+源代码)租赁管家全方位服务(java毕业设计).zip
- java毕业设计丨租房优选智能助手(论文+源代码+PPT模板).zip
- 拉萨2005-2024年近20年历史气象数据下载
- 【java毕业设计】房源小秘书管理工具(源代码+论文+配置方法+PPT模板).zip
- (论文+配置方法+源代码+PPT模板)租房帮手信息管理站(java毕业设计).zip
- (论文+PPT模板+配置+源代码)租赁E家智慧平台【java毕业设计】.zip
- (源代码+论文+PPT模板+配置方法)房源优选智能匹配器【java毕业设计】.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈