⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myhelp.m

📁 经典控制理论MATLAB-GUI设计
💻 M
📖 第 1 页 / 共 2 页
字号:
function varargout = myhelp(varargin)
% MYHELP M-file for myhelp.fig
%      MYHELP, by itself, creates a new MYHELP or raises the existing
%      singleton*.
%
%      H = MYHELP returns the handle to a new MYHELP or the handle to
%      the existing singleton*.
%
%      MYHELP('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in MYHELP.M with the given input arguments.
%
%      MYHELP('Property','Value',...) creates a new MYHELP or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before myhelp_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to myhelp_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 myhelp

% Last Modified by GUIDE v2.5 11-Jun-2005 02:23:08

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @myhelp_OpeningFcn, ...
                   'gui_OutputFcn',  @myhelp_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 myhelp is made visible.
function myhelp_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 myhelp (see VARARGIN)

handle_text=findobj('tag','helpout');
str(1)={'   在此界面将显示本《控制理论CAI》的使用帮助,请点击左边相关按钮以查看相关项的使用帮助'};
str(2)={' '};
str(3)={'  本软件主要包括经典控制理论部分的一些模型转换、系统分析、典型控制系统模拟以及串联校正分析等。 它可方便广大同学学习控制理论这门课程,使那些不熟悉MATLAB软件的同学也能够较好地使用MATLAB提供的资源来更好地学习控制理论这门课程。此外,本软件也可供工程技术人员在进行一些控制系统分析时参考。'};
str(4)={' '};
str(5)={'注意:在当输入不符合规范及超出本软件所允许的范围时,本软件的界面上将不出现任何结果,同时,在MATLAB主界面的command windows中,将显示出错情况'};
set(handle_text,'string',str)
% Choose default command line output for myhelp
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes myhelp wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = myhelp_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 pushbutton20.
function pushbutton20_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton20 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
handle_text=findobj('tag','helpout');
str(1)={'  本程序用于进行滞后校正'};
str(2)={'  首先,选择系统模型,此程序可以在传递函数/零极点函数,以及在闭环函数/开环函数之间转换。'};
str(3)={'  当选择传递函数时,只需输入分子和分母就可以了。当选择零极点模型时,需输入零点、极点、增益。'};
str(4)={'  对于系统参数应输入稳定系统所允许的静态误差值和相位裕量值,然后点击中间的按钮“滞后校正”进行校正。'};
str(5)={'  校正后会出现两个图:figure1为伯德图,figure2阶跃响应曲线。在伯德图中将出现三条曲线,其中红色的为原系统的伯德图,绿色的为校正环节的伯德图,蓝色为校正后的伯德图。'};
set(handle_text,'string',str)

% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% 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)
handle_text=findobj('tag','helpout');
str(1)={'   传递函数模型转换成零极点模型:'};
str(2)={'   在左边的文本框中分别输入原模型的分子和分母,然后点击“转换=〉”按钮,右边的文本框中就会出现与其前面标签相对应的数值。'};
str(3)={'   注意:若某个结果值为空,则表明该值为“Empty matrix: 0-by-1”,即为空矩阵。'};
str(4)={'   其具体函数将在MATLAB的command windows面板显示'};
set(handle_text,'string',str)

% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% 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)
handle_text=findobj('tag','helpout');
str(1)={'  零极点模型转换成传递函数模型:'};
str(2)={'  在左边的文本框中分别输入原模型的零点值、极点值、增益值,然后点击“转换=〉”按钮,右边的文本框中就会出现与其前面标签相对应的数值。'};
str(3)={'  注意:由于零极点值组成矩阵,在输入数值时,在每个元素之间应该输入分号(“;”)。'};
str(4)={'   其具体函数将在MATLAB的command windows面板显示'};
set(handle_text,'string',str)

% --- Executes on button press in pushbutton31.
function pushbutton31_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton31 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
%传递函数to 状态方程
handle_text=findobj('tag','helpout');
str(1)={'  此处进行传递函数模型转换成状态空间形式:'};
str(2)={'  由于本软件主要用于研究线性定常系统,故在这里设计时只考虑到线性定常系统,状态空间模型的 A,B,C,D数值必须为一位数的形式,否则将会出错。故在输入时分子,分母的每个数值都最多为两位。'};
str(3)={'   其具体函数将在MATLAB的command windows面板显示'};
set(handle_text,'string',str)
% --- Executes on button press in pushbutton30.
function pushbutton30_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton30 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
%状态to传递
handle_text=findobj('tag','helpout');
str(1)={'  此处进行状态空间形式转换成传递函数模型:  '};
str(2)={'  由于本软件主要用于研究线性定常系统,故在这里设计时只考虑到线性定常系统,状态空间模型的 A,B,C,D数值必须为一位数的形式,否则将会出错。故在输入时注意每个数应为一位的数值。  '};
str(3)={'   其具体函数将在MATLAB的command windows面板显示'};
set(handle_text,'string',str)
% --- Executes on button press in pushbutton29.
function pushbutton29_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton29 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
%零极点to状态
handle_text=findobj('tag','helpout');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -