function varargout = wjz(varargin)
% WJZ M-file for wjz.fig
% WJZ, by itself, creates a new WJZ or raises the existing
% singleton*.
%
% H = WJZ returns the handle to a new WJZ or the handle to
% the existing singleton*.
%
% WJZ('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in WJZ.M with the given input arguments.
%
% WJZ('Property','Value',...) creates a new WJZ or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before wjz_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to wjz_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 wjz
% Last Modified by GUIDE v2.5 17-Jun-2009 19:50:11
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @wjz_OpeningFcn, ...
'gui_OutputFcn', @wjz_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 wjz is made visible.
function wjz_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 wjz (see VARARGIN)
% Choose default command line output for wjz
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes wjz wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = wjz_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)
x=0:0.1:2*pi;
y=sin(x);
r1=get(handles.radiobutton1,'value')
r2=get(handles.radiobutton2,'value')
if r1==1
plot(x,y)
msgbox('画实线正选曲线','提示')
else
plot(x,y,'r-.')
msgbox('画虚线正选曲线','提示')
end
set(handles.edit1,'string','正弦图')
% 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)
x=0:0.1:2*pi;
y=cos(x);
r1=get(handles.radiobutton1,'value')
r2=get(handles.radiobutton2,'value')
if r1==1
plot(x,y)
msgbox('画实线余选曲线','提示')
else
plot(x,y,'r-.')
msgbox('画虚线余选曲线','提示')
end
set(handles.edit1,'string','余弦图')
% 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)
x=0:0.1:2*pi;
y=tan(x);
r1=get(handles.radiobutton1,'value')
r2=get(handles.radiobutton2,'value')
if r1==1
plot(x,y)
msgbox('画实线正切曲线','提示')
else
plot(x,y,'r-.')
msgbox('画虚线正切曲线','提示')
end
set(handles.edit1,'string','正切图')
% 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)
x=0:0.1:2*pi;
y=cot(x);
r1=get(handles.radiobutton1,'value')
r2=get(handles.radiobutton2,'value')
if r1==1
plot(x,y)
msgbox('画实线余切曲线','提示')
else
plot(x,y,'r-.')
msgbox('画虚线余切曲线','提示')
end
set(handles.edit1,'string','余切图')
% 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)
x=0:0.1:2*pi;
y=log(x);
r1=get(handles.radiobutton1,'value')
r2=get(handles.radiobutton2,'value')
if r1==1
plot(x,y)
msgbox('画实线对数曲线','提示')
else
plot(x,y,'r-.')
msgbox('画虚线对数曲线','提示')
end
set(handles.edit1,'string','对数图')
% 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)
x=0:0.1:2*pi;
y=exp(x);
r1=get(handles.radiobutton1,'value')
r2=get(handles.radiobutton2,'value')
if r1==1
plot(x,y)
msgbox('画实线指数曲线','提示')
else
plot(x,y,'r-.')
msgbox('画虚线指数曲线','提示')
end
set(handles.edit1,'string','指数图')
% 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 pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
t=[0 1 1 2 2 3 4];
y=[0 0 2 2 0 0 0];
r1=get(handles.radiobutton1,'value')
r2=get(handles.radiobutton2,'value')
if r1==1
plot(t,y)
axis([0 4 -0.5 3])
msgbox('画实线方波','提示')
else
plot(t,y,'r-.')
axis([0 4 -0.5 3])
msgbox('画虚线方波','提示')
end
set(handles.edit1,'string','方波图')
% hObject handle to pushbutton7 (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 pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
t=0:0.1:2;
y=sin(2*pi*t);
r1=get(handles.radiobutton1,'value')
r2=get(handles.radiobutton2,'value')
if r1==1
plot(t,y)
msgbox('画实线三角波','提示')
else
plot(t,y,'r-.')
msgbox('画虚线三角波','提示')
end
set(handles.edit1,'string','三角波图')
% hObject handle to pushbutton8 (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)
t=0:0.1:2*pi;
r1=get(handles.radiobutton1,'value')
r2=get(handles.radiobutton2,'value')
if r1==1
plot(sin(t),cos(t))
axis([-1.2 1.2 -1.2 1.2]);
axis equal
msgbox('画实线圆','提示')
else
plot(sin(t),cos(t),'r-.')
axis([-1.2 1.2 -1.2 1.2]);
axis equal
msgbox('画虚线圆','提示')
end
set(handles.edit1,'string','圆形图')
% 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)
x=0:0.3:2*pi;
y=sin(x);
fill(x,y,'y')
set(handles.edit1,'string','饼形图')
msgbox('画饼形图','提示')
% hObject handle to pushbutton10 (see GCBO)
% eventdata r
michaellancy
- 粉丝: 34
- 资源: 7
最新资源
- 使用 TensorRT 引擎的 YOLOv4 对象检测器.zip
- 基于Django的学生信息管理系统
- 使用 TensorRT API 的 YOLOv9 的 Cpp 和 Python 实现.zip
- 使用 tensorflow.js 进行微型 YOLO v2 对象检测 .zip
- Win11系统打印机共享工具
- 论文阅读边缘增强的BECU-Net模型高分辨率遥感影像耕地提取
- 校园最短路径-毕业设计项目
- 使用 tensorflow.js 在浏览器中运行 YOLOv8.zip
- 使用 tensorflow.js 在浏览器中直接运行 YOLOv5.zip
- 基于蚁群算法求解K短路问题(用于轨道交通配流等)+python源码+文档说明
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈