资源简介
GUI与simulink联合仿真,现在将我在学习过程中对于GUI控制simulink时遇到过困难的一些功能做成一个综合实例放在这里,打个包希望给大家省点钱,也希望能够帮助到论坛里需要的朋友!
代码片段和文件信息
function varargout = ex2(varargin)
% EX2 M-file for ex2.fig
% EX2 by itself creates a new EX2 or raises the existing
% singleton*.
%
% H = EX2 returns the handle to a new EX2 or the handle to
% the existing singleton*.
%
% EX2(‘CALLBACK‘hobjecteventDatahandles...) calls the local
% function named CALLBACK in EX2.M with the given input arguments.
%
% EX2(‘Property‘‘Value‘...) creates a new EX2 or raises the
% existing singleton*. Starting from the left property value pairs are
% applied to the GUI before ex2_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to ex2_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 ex2
% Last Modified by GUIDE v2.5 15-Mar-2008 15:06:56
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘ mfilename ...
‘gui_Singleton‘ gui_Singleton ...
‘gui_OpeningFcn‘ @ex2_OpeningFcn ...
‘gui_OutputFcn‘ @ex2_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 ex2 is made visible.
function ex2_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 ex2 (see VARARGIN)
% Choose default command line output for ex2
handles.output = hobject;
web -browser http://www.ilovematlab.cn/thread-3976-1-1.html
% Update handles structure
guidata(hobject handles);
% UIWAIT makes ex2 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
%make sure the simulink model is opened
if isempty(find_system(‘Name‘‘GUI_ex11‘))
open_system(‘GUI_ex11‘);
figure(handles.figure1)
end
%initial the GUI
set(handles.edit1‘String‘0);
set(handles.slider1‘Value‘0);
set(handles.text_y1‘String‘‘y1‘);
set(handles.text_y2‘String‘‘y2‘);
set(handles.text_y3‘String‘‘y3‘);
% --- Outputs from this function are returned to the command line.
function varargout = ex2_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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3695 2008-03-15 16:01 ex2.fig
文件 8377 2008-03-15 16:48 ex2.m
文件 38390 2008-03-15 15:01 GUI_ex11.mdl
文件 122 2008-05-14 18:20 Matlab中文论坛--助努力的人完成毕业设计.url
文件 3543 2009-02-01 16:19 使用帮助:新手必看.htm
----------- --------- ---------- ----- ----
54127 5
相关资源
- matlab和HFSS联合仿真偶极子天线
- matlab和hfss联合仿真输出增益
-
Carsim和simuli
nk联合仿真的模型 - MIMO_OFDM联合仿真的matlab 源程序很完整
- adams_car与Matlab联合仿真
- VREP与MATLAB联合仿真程序--UR5机械臂动
- 基于AMESim MATLAB联合仿真的液压传动风
- MATLAB与ADAMS联合仿真-轿车ASR的ADAMS_C
- HFSS和matlab联合仿真
-
CarSim、Simuli
nk联合仿真介绍及 - Matlab与VPI联合仿真光OFDM传输系统
- HPW 风机和光伏联合仿真
- MATLAB-HFSS联合仿真
- MPCController 通过carsim与matlab联合仿真
-
CarSim与Simuli
nk联合仿真 -
基于MPC的Carsim和Simuli
nk联合仿真模型 - 循迹小车的V-REP与Matlab联合仿真
评论
共有 条评论