- 阅读权限
- 255
- 威望
- 7 级
- 论坛币
- -234475 个
- 通用积分
- 123.7824
- 学术水平
- 3783 点
- 热心指数
- 3819 点
- 信用等级
- 3454 点
- 经验
- 150207 点
- 帖子
- 7546
- 精华
- 32
- 在线时间
- 1327 小时
- 注册时间
- 2013-2-3
- 最后登录
- 2022-2-24
大师
还不是VIP/贵宾
- 威望
- 7 级
- 论坛币
- -234475 个
- 通用积分
- 123.7824
- 学术水平
- 3783 点
- 热心指数
- 3819 点
- 信用等级
- 3454 点
- 经验
- 150207 点
- 帖子
- 7546
- 精华
- 32
- 在线时间
- 1327 小时
- 注册时间
- 2013-2-3
- 最后登录
- 2022-2-24
| 开心 2015-3-27 12:18:02 |
---|
签到天数: 207 天 连续签到: 1 天 [LV.7]常住居民III
|
相似文件
换一批
经管之家送您一份
应届毕业生专属福利!
求职就业群
感谢您参与论坛问题回答
经管之家送您两个论坛币!
+2 论坛币
偶有灵感,做了一个自动画正玄曲线曲线的界面,分享一下 界面文件如下:
在figure上移动移动自己的鼠标,按一按自己的鼠标。
主程序:
本帖隐藏的内容- function varargout = Active_Gui_Plot(varargin)
- % ACTIVE_GUI_PLOT M-file for Active_Gui_Plot.fig
- % ACTIVE_GUI_PLOT, by itself, creates a new ACTIVE_GUI_PLOT or raises the existing
- % singleton*.
- %
- % H = ACTIVE_GUI_PLOT returns the handle to a new ACTIVE_GUI_PLOT or the handle to
- % the existing singleton*.
- %
- % ACTIVE_GUI_PLOT('CALLBACK',hObject,eventData,handles,...) calls the local
- % function named CALLBACK in ACTIVE_GUI_PLOT.M with the given input arguments.
- %
- % ACTIVE_GUI_PLOT('Property','Value',...) creates a new ACTIVE_GUI_PLOT or raises the
- % existing singleton*. Starting from the left, property value pairs are
- % applied to the GUI before Active_Gui_Plot_OpeningFcn gets called. An
- % unrecognized property name or invalid value makes property application
- % stop. All inputs are passed to Active_Gui_Plot_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 Active_Gui_Plot
- % Last Modified by GUIDE v2.5 03-Jan-2015 22:15:34
- % Begin initialization code - DO NOT EDIT
- gui_Singleton = 1;
- gui_State = struct('gui_Name', mfilename, ...
- 'gui_Singleton', gui_Singleton, ...
- 'gui_OpeningFcn', @Active_Gui_Plot_OpeningFcn, ...
- 'gui_OutputFcn', @Active_Gui_Plot_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 Active_Gui_Plot is made visible.
- function Active_Gui_Plot_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 Active_Gui_Plot (see VARARGIN)
- % Choose default command line output for Active_Gui_Plot
- handles.output = hObject;
- % Update handles structure
- guidata(hObject, handles);
- % UIWAIT makes Active_Gui_Plot wait for user response (see UIRESUME)
- % uiwait(handles.figure1);
- % --- Outputs from this function are returned to the command line.
- function varargout = Active_Gui_Plot_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 when user attempts to close figure1.
- function figure1_CloseRequestFcn(hObject, eventdata, handles)
- % hObject handle to figure1 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % Hint: delete(hObject) closes the figure
- delete(hObject);
- clear all
- % --- Executes on mouse press over figure background, over a disabled or
- % --- inactive control, or over an axes background.
- function figure1_WindowButtonDownFcn(hObject, eventdata, handles)
- % hObject handle to figure1 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- persistent g
- if isempty(g)
- g=0;
- end
- cla
- set(gca,'visible','off')
- g=g+1;
- set(hObject,'userdata',g)
- % --- Executes on mouse motion over figure - except title and menu.
- function figure1_WindowButtonMotionFcn(hObject, eventdata, handles)
- % hObject handle to figure1 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- persistent c
- if isempty(c)
- c=0;
- end
- c=c+1;
- g=get(hObject,'userdata');
- t=0:0.1:c*pi/200;
- if g==0
- plot(sin(t),'ks-','markerface','r','markersize',8)
- elseif g==1
- plot(sin(t),'ko-','markerface','m','markersize',8)
- elseif g==2
- plot(sin(t),'kp-','markerface','g','markersize',8)
- else
- plot(sin(t),'kv-','markerface','c','markersize',8)
- end
- drawnow;
复制代码
在理解与学习MATLAB中,需要大家是个多面手 —————— by faruto
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
|
|
-
总评分: 经验 + 200
学术水平 + 10
热心指数 + 10
信用等级 + 5
查看全部评分
|