一、获取代码方式

获取代码方式1:
完整代码已上传我的资源:【运动学】基于matlab GUI倒立摆系统【含Matlab源码 1117期】

获取代码方式2:
通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码。

备注:
订阅紫极神光博客付费专栏,可免费获得1份代码(有效期为订阅日起,三天内有效);

二、部分源代码

function varargout = pendulum(varargin)
% PENDULUM M-file for pendulum.fig
%      PENDULUM, by itself, creates a new PENDULUM or raises the existing
%      singleton*.
%
%      H = PENDULUM returns the handle to a new PENDULUM or the handle to
%      the existing singleton*.
%
%      PENDULUM('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in PENDULUM.M with the given input arguments.
%
%      PENDULUM('Property','Value',...) creates a new PENDULUM or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before pendulum_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to pendulum_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 pendulum% Last Modified by SHE on 15-Dec-2020 22:08:58% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...'gui_Singleton',  gui_Singleton, ...'gui_OpeningFcn', @pendulum_OpeningFcn, ...'gui_OutputFcn',  @pendulum_OutputFcn, ...'gui_LayoutFcn',  [] , ...'gui_Callback',   []);
if nargin && ischar(varargin{1})gui_State.gui_Callback = str2func(varargin{1});
endif nargout[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
elsegui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT% --- Executes just before pendulum is made visible.
function pendulum_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 pendulum (see VARARGIN)% Choose default command line output for pendulum
handles.output = hObject;% Update handles structure
guidata(hObject, handles);% UIWAIT makes pendulum wait for user response (see UIRESUME)
% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.
function varargout = pendulum_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;function edit1_Callback(hObject, eventdata, handles)
% hObject    handle to edit1 (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,'String') returns contents of edit1 as text
%        str2double(get(hObject,'String')) returns contents of edit1 as a double
%以字符串的形式来存储数据文本框1的内容。如果字符串不是数字,则现实空白内容
input =str2double(get(hObject,'String'));
%检查输入是否为空. 如果为空,则默认显示为0
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject, handles);% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispcset(hObject,'BackgroundColor','white');
elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
endfunction edit2_Callback(hObject, eventdata, handles)
% hObject    handle to edit2 (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,'String') returns contents of edit2 as text
%        str2double(get(hObject,'String')) returns contents of edit2 as a double
%以字符串的形式来存储数据文本框2的内容。如果字符串不是数字,则现实空白内容
input =str2double(get(hObject,'String'));
%检查输入是否为空. 如果为空,则默认显示为0
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject, handles);% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispcset(hObject,'BackgroundColor','white');
elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
endfunction edit3_Callback(hObject, eventdata, handles)
% hObject    handle to edit3 (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,'String') returns contents of edit3 as text
%        str2double(get(hObject,'String')) returns contents of edit3 as a double
%以字符串的形式来存储数据文本框3的内容。如果字符串不是数字,则现实空白内容
input =str2double(get(hObject,'String'));
%检查输入是否为空. 如果为空,则默认显示为0
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject, handles);% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispcset(hObject,'BackgroundColor','white');
elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
endfunction edit4_Callback(hObject, eventdata, handles)
% hObject    handle to edit4 (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,'String') returns contents of edit4 as text
%        str2double(get(hObject,'String')) returns contents of edit4 as a double
%以字符串的形式来存储数据文本框4的内容。如果字符串不是数字,则现实空白内容
input =str2double(get(hObject,'String'));
%检查输入是否为空. 如果为空,则默认显示为0
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject, handles);% --- Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispcset(hObject,'BackgroundColor','white');
elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
endfunction edit5_Callback(hObject, eventdata, handles)
% hObject    handle to edit5 (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,'String') returns contents of edit5 as text
%        str2double(get(hObject,'String')) returns contents of edit5 as a double
%以字符串的形式来存储数据文本框5的内容。如果字符串不是数字,则现实空白内容
input =str2double(get(hObject,'String'));
%检查输入是否为空. 如果为空,则默认显示为0
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject, handles);% --- Executes during object creation, after setting all properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispcset(hObject,'BackgroundColor','white');
elseset(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end% --- Executes on selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject    handle to popupmenu1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% Hints: contents = get(hObject,'String') returns popupmenu1 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from popupmenu1
popup_sel_index = get(handles.popupmenu1, 'Value');
popup_sel_index = get(handles.popupmenu1, 'Value');
switch popup_sel_indexcase 1set(handles.text10 ,'String','期望极点');set(handles.text11 ,'String','      -10             -10');set(handles.text12 ,'String','-2+2*sqrt(3)*i -2-2*sqrt(3)*i');case 2set(handles.text10 ,'String','加权矩阵');set(handles.text11 ,'String','Q=[1 0 0 0; 0 0 0 0; 0 0 1 0;0 0 0 0];');set(handles.text12 ,'String','     R=1');case 3set(handles.text10 ,'String','参考输入');set(handles.text11 ,'String','  y_r=0.2*U(t)');set(handles.text12 ,'String',' ');case 4set(handles.text10 ,'String','PID');set(handles.text11 ,'String','  P=5,I=0.001,D=1');set(handles.text12 ,'String',' ');
end

三、运行结果

四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1] 门云阁.MATLAB物理计算与可视化[M].清华大学出版社,2013.

【运动学】基于matlab GUI倒立摆系统【含Matlab源码 1117期】相关推荐

  1. 【光学】基于matlab GUI杨氏双缝干涉【含Matlab源码 001期】

    一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[光学]基于matlab GUI杨氏双缝干涉[含Matlab源码 001期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: 付费 ...

  2. 倒立摆系统matlab程序,用Matlab完成倒立摆系统的分析与综合.docx

    用Matlab完成倒立摆系统的分析与综合 现代控制理论用Matlab完成倒立摆系统的分析与综合 2013/5/23 星期四学号:3201100418杨 博用Matlab完成倒立摆系统的分析与综合一.实 ...

  3. [附源码]计算机毕业设计Python+uniapp基于UNIAPP的教师助手系统6w046(程序+源码+LW+远程部署)

    [附源码]计算机毕业设计Python+uniapp基于UNIAPP的教师助手系统6w046(程序+源码+LW+远程部署) 该项目含有源码.文档.程序.数据库.配套开发软件.软件安装教程 项目运行环境配 ...

  4. [附源码]计算机毕业设计Python+uniapp基于Android的网店系统i7581(程序+源码+LW+远程部署)

    [附源码]计算机毕业设计Python+uniapp基于Android的网店系统i7581(程序+源码+LW+远程部署) 该项目含有源码.文档.程序.数据库.配套开发软件.软件安装教程 项目运行环境配置 ...

  5. 基于JAVA第二课堂选课系统计算机毕业设计源码+系统+lw文档+部署

    基于JAVA第二课堂选课系统计算机毕业设计源码+系统+lw文档+部署 基于JAVA第二课堂选课系统计算机毕业设计源码+系统+lw文档+部署 本源码技术栈: 项目架构:B/S架构 开发语言:Java语言 ...

  6. 基于java点播影院运营系统计算机毕业设计源码+系统+lw文档+mysql数据库+调试部署

    基于java点播影院运营系统计算机毕业设计源码+系统+lw文档+mysql数据库+调试部署 基于java点播影院运营系统计算机毕业设计源码+系统+lw文档+mysql数据库+调试部署 本源码技术栈: ...

  7. 基于JAVA彩票在线购买系统计算机毕业设计源码+系统+lw文档+部署

    基于JAVA彩票在线购买系统计算机毕业设计源码+系统+lw文档+部署 技术栈 项目架构:B/S架构 开发语言:Java语言 开发软件:idea eclipse 前端技术:Layui.HTML.CSS. ...

  8. 基于JAVA校园共享单车系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署

    基于JAVA校园共享单车系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署 基于JAVA校园共享单车系统计算机毕业设计源码+系统+mysql数据库+lw文档+部署 本源码技术栈: 项目架构 ...

  9. 基于JAVA教学质量测评系统计算机毕业设计源码+系统+lw文档+部署

    基于JAVA教学质量测评系统计算机毕业设计源码+系统+lw文档+部署 基于JAVA教学质量测评系统计算机毕业设计源码+系统+lw文档+部署 本源码技术栈: 项目架构:B/S架构 开发语言:Java语言 ...

  10. 基于JAVA网上汽车售票系统计算机毕业设计源码+数据库+lw文档+系统+部署

    基于JAVA网上汽车售票系统计算机毕业设计源码+数据库+lw文档+系统+部署 基于JAVA网上汽车售票系统计算机毕业设计源码+数据库+lw文档+系统+部署 本源码技术栈: 项目架构:B/S架构 开发语 ...

最新文章

  1. [Android1.5]Android2.0版本以下Activity切换动画效果
  2. CUDA学习-计算实际线程ID
  3. Python 技术篇-socket套接字实现两个窗口间消息传递实例演示,TCP实现
  4. split、replace、indexof、substr 用法 (获取后台富文本框内容,截取图片)
  5. LeetCode 1781. 所有子字符串美丽值之和
  6. 安卓学习笔记13:安卓触摸事件
  7. 计算机组成微程序操作码怎么写,计算机组成原理学习笔记——控制器
  8. C++基础语法-02-运算符重载
  9. 训练集、测试集、验证集
  10. linux 脚本 过滤 词,linux学习之shell脚本 - 文本过滤
  11. Head first jQuery读书笔记
  12. 服务器设置自动开机及定时开机
  13. hive:正则:匹配中文/英文/数字(REGEXP 和 rlike)
  14. Android添加拍照功能,Android开发实现拍照功能的方法实例解析
  15. 《狂飙》壁纸太帅,Python自动切换太酷(8)
  16. 外边距与内边距的区别
  17. Python异常处理:ImportError: cannot import name 'XXX' from 'XXXX'
  18. 公共计算机课件,全国计算机等级考试二级ACCESS公共基础知识课件.ppt
  19. bugku-web-source
  20. vue3.0 组件传值

热门文章

  1. Comet OJ Contest 4
  2. 第八章 文件资源共享
  3. 构建手机apk的过程
  4. 深入浅出-iOS函数式编程的实现 响应式编程概念
  5. 2016/2/24 1,dotctype有几种? 2,了解html的发展历史
  6. PageRank与社交网络模型评估
  7. OPENGL学习笔记整理(三):缓冲区对象
  8. 数据库优化之MySQL
  9. HTC 一个基站老无法定位
  10. Atitit db access req数据库访问规范jdo jdbc jpa pdo sql 目录 1. 常见特性 1 1.1. 元数据 API 1 1.2. 分布式事务 vs事务中使用 Sav