一、获取代码方式

获取代码方式1:
完整代码已上传我的资源:【气动学】基于matlab GUI外弹道仿真系统【含Matlab源码 1044期】

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

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

二、案例简介

1 设计要求及条件

2 设计分析

三、部分源代码

function varargout = simulation_GUI(varargin)
% SIMULATION_GUI M-file for simulation_GUI.fig
%      SIMULATION_GUI, by itself, creates a new SIMULATION_GUI or raises the existing
%      singleton*.
%
%      H = SIMULATION_GUI returns the handle to a new SIMULATION_GUI or the handle to
%      the existing singleton*.
%
%      SIMULATION_GUI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in SIMULATION_GUI.M with the given input arguments.
%
%      SIMULATION_GUI('Property','Value',...) creates a new SIMULATION_GUI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before simulation_GUI_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to simulation_GUI_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 simulation_GUI% Last Modified by GUIDE v2.5 09-Jun-2021 11:01:14% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...'gui_Singleton',  gui_Singleton, ...'gui_OpeningFcn', @simulation_GUI_OpeningFcn, ...'gui_OutputFcn',  @simulation_GUI_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 simulation_GUI is made visible.
function simulation_GUI_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 simulation_GUI (see VARARGIN)% Choose default command line output for simulation_GUI
handles.output = hObject;
set(handles.hon,'String','标准大气压hon=760mmHg');
set(handles.taoon,'String','标准虚温τon=288.4℃');
set(handles.R,'String','标准气体常数R=29.27');
set(handles.G,'String','温度梯度G=5.6828e-3');
set(handles.eon,'String','标准水蒸气分压eon=8.4mmHg');
set(handles.q,'String','弹重q=216.5kg');
set(handles.d,'String','弹径d=0.299m');
set(handles.L,'String','弹长L=2.11m');
set(handles.gon,'String','重力加速度g=760mmHg');
set(handles.Cxo,'String','空气阻力系数Cxo=0.16');
set(handles.S,'String','标准下落时间S=21.12秒');
% Update handles structure
guidata(hObject, handles);% UIWAIT makes simulation_GUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.
function varargout = simulation_GUI_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 draw_2d.
function draw_2d_Callback(hObject, eventdata, handles)
% hObject    handle to draw_2d (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)set(handles.z_inform,'Visible','off');set(handles.xend,'String',0);
guidata(hObject, handles);
set(handles.yend,'String',2000);
guidata(hObject, handles);
set(handles.zend,'String',0);
guidata(hObject, handles);u0 = str2num(get(handles.u0,'String'));
p0 = str2num(get(handles.p0,'String'));
x0 = str2num(get(handles.x0,'String'));
y0 = str2num(get(handles.y0,'String'));
fu=@(y,u,p)(-0.081931*(1-1.9705*10^(-5)*y)^6.0119/(288.4+5.6828*10^(-3)*(2000-y))*u^2);
fp=@(u)(9.806/u);
fx=@(u)(u);
fy=@(u,p)(u*p);h=0.025;
N=1000;T=zeros(1,N+1);
U=zeros(1,N+1);
P=zeros(1,N+1);
X=zeros(1,N+1);
Y=zeros(1,N+1);U(1)=u0;
P(1)=p0;
X(1)=x0;
Y(1)=y0-y0;for i=1:Nfu1=feval(fu,Y(i),U(i),P(i));fp1=feval(fp,U(i));fx1=feval(fx,U(i));fy1=feval(fy,U(i),P(i));fu2=feval(fu,Y(i)+h/2*fy1,U(i)+h/2*fu1,P(i)+h/2*fp1);fp2=feval(fp,U(i)+h/2*fu1);fx2=feval(fx,U(i)+h/2*fu1);fy2=feval(fy,U(i)+h/2*fu1,P(i)+h/2*fp1);fu3=feval(fu,Y(i)+h/2*fy2,U(i)+h/2*fu2,P(i)+h/2*fp2);fp3=feval(fp,U(i)+h/2*fu2);fx3=feval(fx,U(i)+h/2*fu2);fy3=feval(fy,U(i)+h/2*fu2,P(i)+h/2*fp2);fu4=feval(fu,Y(i)+h*fy3,U(i)+h*fu3,P(i)+h*fp3);fp4=feval(fp,U(i)+h*fu3);fx4=feval(fx,U(i)+h*fu3);fy4=feval(fy,U(i)+h*fu3,P(i)+h*fp3);U(i+1)=U(i)+h*(fu1+2*fu2+2*fu3+fu4)/6;P(i+1)=P(i)+h*(fp1+2*fp2+2*fp3+fp4)/6;X(i+1)=X(i)+h*(fx1+2*fx2+2*fx3+fx4)/6;Y(i+1)=Y(i)+h*(fy1+2*fy2+2*fy3+fy4)/6;set(handles.xend,'String',num2str(X(i)));guidata(hObject, handles);endl=find(Y>y0);
l=l(1);
U=U(1:l);
P=P(1:l);
X=X(1:l);
Y=Y(1:l);
U;
P;
X;
Y=y0-Y;imge_2d=plot(X,Y,'r');
labelx_2d=xlabel('X:Firing Range');
labely_2d=ylabel('Y:Firing Altitude');
handles.img_2d = imge_2d;%保存句柄
handles.img_2d = labelx_2d;
handles.img_2d = labely_2d;
str=get(handles.code_2d,'String');
eval(str);
guidata(hObject,handles);
xl = num2str(X(l));
set(handles.xend,'String',xl);
guidata(hObject, handles);
set(handles.yend,'String',0.000);
guidata(hObject, handles);% --- Executes on button press in draw_3d.
function draw_3d_Callback(hObject, eventdata, handles)
% hObject    handle to draw_3d (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)set(handles.xend,'String',0);
guidata(hObject, handles);
set(handles.yend,'String',2000);
guidata(hObject, handles);
set(handles.zend,'String',0);
guidata(hObject, handles);u0 = str2num(get(handles.u0,'String'));
p0 = str2num(get(handles.p0,'String'));
x0 = str2num(get(handles.x0,'String'));
y0 = str2num(get(handles.y0,'String'));
z0 = str2num(get(handles.z0,'String'));
fu=@(y,u,p)(-0.081931*(1-1.9705*10^(-5)*y)^6.0119/(288.4+5.6828*10^(-3)*(2000-y))*u^2);
fp=@(u)(9.806/u);
fx=@(u)(u);
fy=@(u,p)(u*p);
fz=@()(z0);

四、运行结果


五、matlab版本及参考文献

1 matlab版本
2014a

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

【气动学】基于matlab GUI外弹道仿真系统【含Matlab源码 1044期】相关推荐

  1. 【气动学】外弹道仿真系统含Matlab源码

    1 简介 本课程设计内容为水平轰炸弹道的求解,列出轰炸弹道方程组并利用龙格库塔法解算弹道方程.设计中包含了二维弹道与三维弹道的计算,并都绘制了弹道运动轨迹,最终还将整个题目集中在一个图形用户界面(GU ...

  2. 【机械仿真】基于matlab打桩机运动学仿真【含Matlab源码 2101期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[机械仿真]基于matlab打桩机运动学仿真[含Matlab源码 2101期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: ...

  3. 【雷达通信】基于matlab雷达探测威力仿真【含Matlab源码 1974期】

    一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[雷达通信]基于matlab雷达探测威力仿真[含Matlab源码 1974期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: 付 ...

  4. 【数学建模】基于matlab动态水波仿真【含Matlab源码 2056期】

    ⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[数学建模]基于matlab动态水波仿真[含Matlab源码 2056期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: 付费 ...

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

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

  6. 基于Java毕业设计校园外卖系统Web端源码+系统+mysql+lw文档+部署软件

    基于Java毕业设计校园外卖系统Web端源码+系统+mysql+lw文档+部署软件 基于Java毕业设计校园外卖系统Web端源码+系统+mysql+lw文档+部署软件 本源码技术栈: 项目架构:B/S ...

  7. 基于JAVA药品自动贩卖系统计算机毕业设计源码+系统+数据库+lw文档+部署

    基于JAVA药品自动贩卖系统计算机毕业设计源码+系统+数据库+lw文档+部署 基于JAVA药品自动贩卖系统计算机毕业设计源码+系统+数据库+lw文档+部署 本源码技术栈: 项目架构:B/S架构 开发语 ...

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

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

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

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

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

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

最新文章

  1. 使用C# 3.0编译器编译 Asp.Net 项目代码
  2. 如何在mac下安装MPV播放器?
  3. 其他算法-LSH局部敏感度哈希
  4. 客户端负载均衡Ribbon之一:Spring Cloud Netflix负载均衡组件Ribbon介绍
  5. 《移动App测试的22条军规》—App测试综合案例分析23.7节测试微信App对于操作系统特性的支持程度...
  6. 婚宴座位图html5,图解现代婚宴座位安排
  7. 首提 Database Plus 新理念,SphereEx 获数百万美元天使融资,接棒 ShardingSphere 打造新型分布式生态
  8. 从JDK中,我们能学到哪些设计模式?
  9. [NOI2014]动物园
  10. python缩放图片,复制即用
  11. hadoop-执行mapreduce时hang住的问题
  12. A/B test模块使用以及配置
  13. 关于AngularJs中$http post、get 发送和接受参数详解
  14. 【2019牛客暑期多校训练营(第八场)E】Explorer【线段树分治维护图连通】
  15. 10.7 a.m.小结
  16. 服务器迁移系统工具,win10如何用自带迁移工具迁移系统?_网站服务器运行维护,windows10,迁移系统...
  17. Win7 没有声音的解决方法
  18. 更新pip后出现WARNING:pip is being invoked by an old script wrapper
  19. 反编译008神器,修改手机型号与android版本号信息
  20. UVA 11384 Help is needed for Dexter (递归函数)

热门文章

  1. 单细胞数据高级分析之初步降维和聚类 | Dimensionality reduction | Clustering
  2. HDU 6127 Hard challenge (极角排序)
  3. 我的Python开发之路---微信网页授权(扫码登陆)
  4. 常见浏览器兼容性问题与解决方案(CSS)
  5. 【Swing 3】布局管理器与简单的聊天界面
  6. clion解决中文乱码的问题
  7. Python TCP 学习笔记
  8. 传智播客 C/C++学习笔记 指针3 理解指针必须与内存四区相结合
  9. 181124每日一句
  10. unity linerenderer在Game窗口中任意画线